Skip to content

Instantly share code, notes, and snippets.

View AngDrew's full-sized avatar
🐢
Slowly but Sure

Andrew A AngDrew

🐢
Slowly but Sure
  • Surabaya
View GitHub Profile
@AngDrew
AngDrew / auto_complete_on_list.dart
Last active April 16, 2024 07:33
flutter extensions
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();
}
}
@AngDrew
AngDrew / Privacy Policy
Created January 25, 2022 09:49
Privacy Policy of MIF App
We only use camera for QR-Code login to the website.
@AngDrew
AngDrew / flutter_preload_image.dart
Last active October 25, 2024 21:46
preload flutter image for splash screen. so there will be no blank screen blink
// @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) {
@AngDrew
AngDrew / my_text_field.dart
Created April 3, 2021 10:30
Highly customizable TextField
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,