xb_scaffold
library
Functions
-
actionSheet({required List<String> titles, required ValueChanged<int> onSelected, int? selectedIndex, Color? selectedColor, String? dismissTitle, Color? dismissTitleColor, double? dismissTitleFontSize, VoidCallback? onTapDismiss})
→ dynamic
-
-
actionSheetMulti({required List<String> titles, required ValueChanged<List<int>> onDone, double topBarHeight = 50, VoidCallback? onCancel, List<int>? selectedIndexes, Widget? cancelBtn, Widget? titleWidget, Widget? doneBtn, Widget? topBarSeparator, double topRadius = 10, ActionSheetMultiItemBuilder? itemBuilder, IndexedWidgetBuilder? separatorBuilder})
→ dynamic
-
-
actionSheetMultiItem({required int itemCount, required ActionSheetMultiItemBuilder itemBuilder, required ValueChanged<List<int>> onDone, double topBarHeight = 50, VoidCallback? onCancel, List<int>? selectedIndexes, Widget? cancelBtn, Widget? titleWidget, Widget? topBarSeparator, Widget? doneBtn, double topRadius = 10, IndexedWidgetBuilder? separatorBuilder})
→ dynamic
-
-
actionSheetWidget({required Widget widget, bool isScrollControlled = false, bool isDismissible = true, bool enableDrag = true})
→ dynamic
-
-
dialog({required String title, TextStyle? titleStyle, required String msg, TextStyle? msgStyle, required List<String> btnTitles, Color? btnHighLightColor, Color? btnDefaultColor, double? btnFontSize, required ValueChanged<int> onSelected, double? maxWidth})
→ dynamic
-
-
dialogContent({required String title, TextStyle? titleStyle, required Widget content, required List<String> btnTitles, Color? btnHighLightColor, Color? btnDefaultColor, double? btnFontSize, required ValueChanged<int> onSelected, double? maxWidth})
→ dynamic
-
-
dialogWidget(Widget widget)
→ dynamic
-
-
endEditing({BuildContext? context})
→ void
-
结束输入框编辑
-
getDocumentTitle()
→ String
-
-
hideLoadingGlobal()
→ dynamic
-
-
isXBRoute(Route route)
→ bool
-
判断是否是XBRoute
-
pageLogInfo({String separator = '\n'})
→ String
-
-
pop<O extends Object?>([O? result])
→ void
-
回到上一页
-
popToRoot()
→ void
-
回到根页面
-
popUntilType(Type type)
→ void
-
回到最后一个Type类型的页面
如果找不到,则回到根页面
-
push<T extends Object?>(Widget newPage, [int style = 0])
→ Future<T?>
-
进入新页面
style:0 iOS风格;1 material风格
-
pushAndClearStack<T extends Object?>(Widget newPage, [int style = 0])
→ Future<T?>
-
进入新页面,并且清除栈中的页面
style:0 iOS风格;1 material风格
-
recordPageLog(String msg)
→ void
-
-
replace<T extends Object?>(Widget newPage, [int style = 0])
→ Future<T?>
-
用新页面替换当前页
-
routeIsMapWidget({required Route route, required Widget widget})
→ bool
-
判断路由是否映射Widget
非XBRoute都返回false
-
setDocumentTitle(String title)
→ dynamic
-
-
showLoadingGlobal({bool topLeftEnable = true, bool topCenterEnable = false, bool topRightEnable = false, bool contentEnable = false, String? msg, Widget? widget})
→ dynamic
-
展示全局loading,优先级:widget > xbLoadingBuilder > const XBLoadingWidget()
-
showPageLog()
→ dynamic
-
-
stackContainType(Type type)
→ bool
-
类型是否在栈里,如果是根节点,没办法判断是否在栈里
-
toast(String msg, {int duration = 3, double bottom = 150, Color? backgroundColor, double radius = 8, TextStyle? msgStyle})
→ dynamic
-
-
toastWidget({required Widget widget, int duration = 3, double bottom = 150})
→ dynamic
-
-
topIsType(Type type)
→ bool
-
栈顶是否是type类型
-
xbError(Object info)
→ dynamic
-
-
xbLine({double? width, Color? color, int direction = 0, double startPadding = 0, double endPadding = 0})
→ Widget
-
0 横向 1 纵向
-
xbLog(Object info)
→ dynamic
-
-
xbParse<T>(dynamic object, {int trueValue = 1, T factory(Map<String, dynamic>)?})
→ T?
-
-
xbParseList<T>(dynamic object, {int trueValue = 1, T factory(Map<String, dynamic>)?})
→ List<T>?
-
-
xbSpace({double? height, double? width})
→ Widget
-
-
xbSpaceHeight(double height)
→ Widget
-
-
xbSpaceWidth(double width)
→ Widget
-
-
xbUnDisappear(Object info)
→ dynamic
-
Typedefs
-
ActionSheetMultiItemBuilder
= Widget Function(BuildContext context, int index, bool isSelected, double height, VoidCallback onTap)
-
-
-
-
-
-
-
ItemHeightForIndexPath
= double Function(XBSectionIndexPath indexPath)
-
-
SectionListItemBuilder
= Widget Function(BuildContext context, XBSectionIndexPath indexPath)
-
-
SectionListOffsetChanged
= void Function(double currentOffset, double maxOffset)
-
-
SectionListSeparatorBuilder
= Widget Function(BuildContext context, XBSectionIndexPath indexPath, bool isLast)
-
-
SeparatorHeightForIndexPath
= double Function(XBSectionIndexPath indexPath, bool isLast)
-
-
-
XBLoadingBuilder
= Widget Function(BuildContext context, String? msg)
-
用于外部控制loading要长什么样
-
XBTableCellBuilder
= Widget Function(XBTableIndex index)
-
-
-
XBTaskFunc
= void Function(dynamic params)
-
-
XBValueChanged2<T, S>
= void Function(T value1, S value2)
-
value changed
-
XBValueChanged3<T, S, O>
= void Function(T value1, S value2, O value3)
-
-
XBValueChanged4<T, S, O, P>
= void Function(T value1, S value2, O value3, P value4)
-
-
XBValueChanged5<T, S, O, P, W>
= void Function(T value1, S value2, O value3, P value4, W value5)
-
-
XBValueGetter<T, S>
= T Function(S value)
-
value getter
-
XBValueGetter2<T, S, O>
= T Function(S value1, O value2)
-
-
XBValueGetter3<T, S, O, P>
= T Function(S value1, O value2, P value3)
-
-
XBValueGetter4<T, S, O, P, W>
= T Function(S value1, O value2, P value3, W value4)
-
-
XBValueGetter5<T, S, O, P, W, Z>
= T Function(S value1, O value2, P value3, W value4, Z value5)
-