mini_widget library

Classes

Application
BadgeWidget
BaseDialog
BorderWidget
圆角背景控件
BottomSheetDialog
ChartColors
CheckItem<T>
ColorUtil
CustomizeDialog
自定义对话框
DataFormats
一些常用格式参照。可以自定义格式,例如:"yyyy/MM/dd HH:mm:ss","yyyy/M/d HH:mm:ss"。 格式要求 year -> yyyy/yy month -> MM/M day -> dd/d hour -> HH/H minute -> mm/m second -> ss/s
DateUtil
Date Util.
DefaultDropdownMenuController
DefaultPage
This widget is just like this: ----------------|--------------------- MainItem1 |SubItem1 MainItem2 |SubItem2
EditCell
EditValueModel
EmptyWidget
ErrorLineCell
ExpansionPanelController
ExpansionPanelWidget
Gaps
间隔
GroupTagPanelWidget
HeightKeyWidget
ImageCell
ImageLabelCell
ImagesViewPage
InkCell
InputDialog
LaunchPage
启动图封装
LineCell
LoadingDialog
LoadingListWidget
MaterialButtonCell
MiniButton
MiniColor
MiniDetailPage
MiniDetailState<T extends StatefulWidget>
MiniDimen
MiniIconButton
MiniListState<T extends StatefulWidget, M>
列表组件
MiniSearchWidget
MiniSegmentedState<T extends StatefulWidget>
分段页面
MiniStyle
MiniTableListState<T extends StatefulWidget, M>
MiniTabListState<T extends StatefulWidget, M>
表格列表,支持左右滑动
MiniTextField
输入框封装
NumUtil
PaintModel
PopParam
ProgressDialog
加载中的弹框
RegexUtil
Regex Util.
ScrawlPainter
涂鸦工具
ScrawlWithLocationState
ScrawlWithLocationWidget
图片涂鸦+显示地理位置, 获取图片
SearchListDialog<T>
SegmentedModel
SelectPage<T>
多选Or单选界面,成功后,返回 List
SelectWidget<T>
选择组件,支持单选和多选
SelectWidgetState<T>
SeparatorWidget
间隔线条
SizeClipper
StringUtil
TabHeaderCell
表头
TabModel
TabRowCell
TagPanelWidget
TagValueCell
TagValueModel
ThemeUtil
ToastUtil
UrlUtil
UsNumberTextInputFormatter

Mixins

StateMixin<T extends StatefulWidget>

Constants

colorsDic → const Map<String, Color>
ID_CARD_PROVINCE_DICT → const List<String>
id card province dict.
kDropdownMenuItemHeight → const double
MONTH_DAY → const Map<int, int>

Functions

build2LineCell({required String label, required String value, Color labelColor = MiniColor.black, String? smallLabel, Color smallColor = MiniColor.black, Color valueColor = MiniColor.black, VoidCallback? voidCallback}) Widget
buildCheckCell({String? label, Color labelColor = Colors.black87, TextStyle? labelTextStyle, bool selected = false, Color selectColor = Colors.blue, ValueChanged<bool>? onSelected, EdgeInsets padding = const EdgeInsets.all(5)}) Widget
复选控件
buildCheckItem(String label, bool selected, {Color color = MiniColor.white, String? iconUrl}) Widget
选择菜单
buildColorCard({required Widget child, Color? lightColor, Color darkColor = const Color(0xFF4EE07A)}) Widget
buildErrorLineCell({required String errorText, IconData errorIcon = Icons.error, Color errorColor = Colors.red, double height = 40, Color backgroundColor = Colors.white}) Widget
buildFirstCheckItem(BuildContext context, String label, bool selected) Widget
一级菜单标题
buildHeadCardCell({String? headText, String? rightHeadText, TextStyle? headTextStyle, TextStyle? rightHeadTextStyle, BuildContext? context, Widget? headChild, Widget? child, List? values, Color color = Colors.white, double tagWidth = 80, double miniHeight = 30, double fontSize = 16, EdgeInsetsGeometry valuePadding = const EdgeInsets.all(1), EdgeInsetsGeometry childPadding = const EdgeInsets.all(5), double paddingRight = 0.0, VoidCallback? onMoreTop, VoidCallback? onMoreLongPress}) Widget
构建头部+卡片
buildHeaderCell({String? imagePath, Widget? ledging, String? title = '', String? title2 = '', TextStyle? textStyle, TextStyle? textStyle2, EdgeInsetsGeometry padding = const EdgeInsets.all(10), BuildContext? context, VoidCallback? onMoreTop, VoidCallback? onMoreLongPress}) Widget
抬头
buildIconLineCell({required Icon icon, required String label, Color? labelColor, Color? valueColor, VoidCallback? voidCallback}) Widget
Icon + Text 横向显示
buildLineCell({required String title, Widget? titleChild, Widget? subTitle, Icon? icon, String? svgName, String? iconName, String? numString, bool showNext = true, Color color = Colors.white, Color titleColor = Colors.black, bool showLine = false, VoidCallback? onPressed}) Widget
buildListMoreCell({String? title, int allSize = 0, int size = -1, VoidCallback? onMoreTop, VoidCallback? onLongPress, String moreText = '更多 '}) Widget
列表带更多抬头
buildRadioCell({String? label, ValueChanged<bool>? onSelected, Color labelColor = Colors.black87, bool selected = false, Color selectColor = Colors.blue, TextStyle? labelTextStyle}) Widget
单选控件
buildSearchCell({String hint = '多关键字用空格分开搜索', TextEditingController? controller, bool enInput = true, ValueChanged<String>? onSubmitted, ValueChanged<String>? onChanged}) Widget
hint - 搜索提示
enInput - 是否可以录入
buildSearchSpan(String content, String searchText, {Color searchTextColor = Colors.red, TextStyle style = const TextStyle(color: Colors.black)}) Widget
创建搜索内容
buildSubCheckItem(BuildContext context, String label, bool selected) Widget
二级菜单
buildTagSelectCell<T>(BuildContext context, String tag, {IconData iconData = Icons.keyboard_arrow_down, Widget? icon, Color? iconColor = const Color(0xffbcbcbc), double tagWidth = 100, String? hintText, double fontSize = 16, double miniHeight = 40, Color tagColor = const Color(0xff63728f), TextEditingController? controller, TextInputType? inputType, InputDecoration? inputDecoration, List<T>? items, BuildCheckChild<T>? buildCheckChild, bool autoHeight = true, VoidCallback? onTap, bool required = false, bool isEdit = true, int? valueMaxLines = 1, double paddingRight = 0.0, EdgeInsetsGeometry padding = const EdgeInsets.all(1), bool showLine = false, Color color = Colors.transparent, Widget? child, ValueChanged<int>? onItemSelected, double iconWidth = 40, TagCellStyle style = TagCellStyle.style2, double? dialogWidth}) Widget
onItemSelected -1 代表无数据
buildTimeLineCell({String dealTime = '', String dealMan = '', String headUrl = '', Widget? headDefault, String title = '', String? memo, String? circularLabel, Color circularColor = Colors.blue, bool isState = false, bool isEnd = false}) Widget
defaultGetItemLabel(dynamic data) String?
showBottomPopup<T>(BuildContext context, String title, List<T> items, {String? message, BuildCheckChild<T>? buildCheckChild, double? height, double? width, bool autoHeight = false}) Future<int?>
showConfirmDialog(BuildContext context, String content, {String? title, String? colorContent, String? cancelText, VoidCallback? onCancelPressed, String? okText, VoidCallback? onOkPressed, bool left = false}) → void
showCustomizeDialog(BuildContext context, Widget widget, {bool barrierDismissible = true, Future<bool> onWillPop()?}) Future
showInputDialog(BuildContext context, ValueChanged<String> okCallback, {ValueChanged<String>? cancelCallback, String? hintText, required String title, TextStyle? titleTextStyle, String? message, int? maxLength, String? okText, String? cancelText, bool required = true, String? content, TextInputType? inputType, int? maxLines, int? minLength, double? width, int? maxNum}) → void
showLoadingDialog(BuildContext context, {String hintText = '正在处理…', bool barrierDismissible = false, Future<bool> onWillPop()?}) → void
showMassageDialog(BuildContext context, String content, {String? title, String? colorContent, String? buttonText = '知道了', VoidCallback? onPressed, TextStyle? titleStyle, bool left = false}) → void
showMessageDialog(BuildContext context, {required String title, required String message, TextStyle? titleStyle, String backLabel = "知道了"}) → dynamic
showOkDialog(BuildContext context, {required String title, required String message, TextStyle? titleStyle, String cancelLabel = '取消', String okLabel = "确认"}) Future<int?>

Typedefs

BuildCheckChild<T> = Widget Function(BuildContext context, T t)
Compare<T> = int Function(T o1, T o2)
Contains<T> = bool Function(T model, String key)
GetItemLabel = String? Function(dynamic data)
GetSubData<T, E> = List<E> Function(T data)
ToString<T> = String Function(T model)