mini_dialog library Null safety

Classes

UsNumberTextInputFormatter
只允许输入小数

Functions

buildSearchSpan(String content, String searchText, {Color searchTextColor = Colors.red, TextStyle style = const TextStyle(color: Colors.black, fontSize: 16), bool insensitiveCase = true}) Widget
创建搜索内容
clip(String value) → void
复制到剪切板
showMiniAlterDialog(BuildContext context, String title, String message, {String cancelLabel = '知道了', String? keyword, Color keywordColor = Colors.pinkAccent, TextStyle? titleStyle, bool barrierDismissible = true}) Future<bool?>
显示提示提示框
showMiniBottomPopup<T>(BuildContext context, String title, List<Widget> children, {double? height, Color backgroundColor = Colors.white, Widget operation = const SizedBox(height: 15), VoidCallback? onOk, EdgeInsetsGeometry padding = const EdgeInsets.only(left: 5, right: 5, bottom: 10)}) Future<T?>
showMiniConfirmDialog(BuildContext context, String title, String message, {String keyword = '', Color keywordColor = Colors.pinkAccent, TextStyle? titleStyle, bool barrierDismissible = false, String confirmLabel = '确认', String cancelLabel = '取消', Color cancelColor = Colors.grey, Color confirmColor = Colors.blue}) Future<bool?>
确认对话框
showMiniCustomizeDialog<T>(BuildContext context, {required Widget child, bool barrierDismissible = false}) Future<T?>
显示自定义对话框
showMiniIconDialog(BuildContext context, {String? label, Widget icon = const Icon(Icons.check, color: Colors.green, size: 44), Color? labelColor = Colors.black54}) → dynamic
showMiniInputDialog(BuildContext context, String title, {String? label, String? message, String? content, String? hint, TextInputType inputType = TextInputType.text, TextStyle messageTextStyle = const TextStyle(height: 1.2, color: Colors.pinkAccent, fontSize: 18), String cancelLabel = '取消', String confirmLabel = '确认', VoidCallback? onCancelCallback, ValueChanged<String>? onConfirmCallback}) Future<String?>
输入对话框
showMiniListPopup<T>(BuildContext context, String title, List<T> dataSource, {double titleHeight = 60, ToString<T>? toLabel, BuildCheckChild<T>? buildItem, Color backgroundColor = Colors.white, Widget operation = const SizedBox(height: 15), EdgeInsetsGeometry padding = const EdgeInsets.only(left: 5, right: 5, bottom: 10)}) Future<int?>
showMiniLoadingDialog(BuildContext context, {String? label}) → dynamic
showMiniSearchListPopup<T>(BuildContext context, List<T> dataSource, {required Contains<T> contains, String? hintText, double titleHeight = 60, ToString<T>? toLabel, BuildCheckChild<T>? buildItem, Color backgroundColor = Colors.white, Widget operation = const SizedBox(height: 15), EdgeInsetsGeometry padding = const EdgeInsets.only(left: 5, right: 5, bottom: 10)}) Future<int?>

Typedefs

BuildCheckChild<T> = Widget Function(BuildContext context, T t, [String? highlight])
Contains<T> = bool Function(T object, String content)
对象的模糊查找
ToString<T> = String Function(T model)