This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension AutoCompleteOnList<T> on List<T> { | |
List<String> autoCompleteOnList(String query) { | |
return where((T element) { | |
String option = element.toString(); | |
return option.toLowerCase().contains(query.toLowerCase()); | |
}).map((T e) => e.toString()).toList(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We only use camera for QR-Code login to the website. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @dart=2.12 | |
// load_image.dart | |
import 'dart:async'; | |
import 'dart:ui'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/painting.dart'; | |
import 'package:flutter/services.dart'; | |
Future<void> loadImage(ImageProvider provider) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:flutter_screenutil/flutter_screenutil.dart'; | |
import '../resources/r.dart'; | |
class MyTextField extends StatefulWidget { | |
const MyTextField( | |
this.label, | |
this.onChange, { | |
this.iconData, |