widget/widget_template library

Classes

Gaps
间隔

Functions

buildAppBarWidget({List<Widget>? actions, Color? backgroundColor, Widget? leading, bool? automaticallyImplyLeading, TextStyle? textStyle, Widget? titleWidget, FontWeight? fontWeight, bool centerTitle = true, String title = '', double? titleSpacing, PreferredSizeWidget? bottom, double? leadingWidth, double? toolbarHeight, IconThemeData? iconTheme}) PreferredSizeWidget
公共控件/
buildBoxShadow({GestureTapCallback? onTap, AlignmentGeometry? alignment, double? height, double? width, Offset? offset, Color? boxColor, double blurRadius = 10, BorderRadiusGeometry? borderRadiusGeometry, Widget? child, EdgeInsetsGeometry? padding, BoxBorder? border, EdgeInsets? margin, double radius = 5, Color? backgroundColor}) Widget
阴影框
buildConnerNetworkImage({LoadStateChanged? loadStateChanged, bool enableLoadState = false, bool cache = true, bool enableMemoryCache = true, bool clearMemoryCacheIfFailed = true, required String url, double width = double.infinity, double height = double.infinity, bool isCircle = false, double radius = 5, BoxFit fit = BoxFit.fill}) Widget
圆角图片
buildListViewSeparated({bool closeToTrailing = false, bool useKeFrame = true, ViewPortBuilder? viewportBuilder, required int itemCount, required IndexedWidgetBuilder itemBuilder, Axis scrollDirection = Axis.vertical, double dividerHeight = 15, Color dividerColor = Colors.transparent, ScrollPhysics? physics, EdgeInsets parentPadding = EdgeInsets.zero, EdgeInsets itemPadding = EdgeInsets.zero, bool useSliver = false, bool shrinkWrap = false, bool useListView = true, CollectGarbage? collectGarbage, bool includeStart = true, bool includeEnd = true, Widget? placeHolder, int estimateCount = 0, ScrollController? controller, double? cacheExtent, bool useTransition = false}) Widget
间隔listview
buildNoDataWidget({BaseViewState? viewStateModel, Widget? child, GestureTapCallback? onTap}) Widget
buildRefreshNoDataWidget({BaseViewState? viewState, Widget? busyWidget, ViewStateWidgetBuilder? emptyWidgetBuilder, ViewStateWidgetBuilder? errorWidgetBuilder, bool showErrorWidget = true, bool showEmptyWidget = true, bool showBusyWidget = true}) Widget?
buildScaffoldWidget({required Widget body, Key? key, double? mToolBarHeight, Color? backgroundColor, Color? appBarBackColor, Widget? leading, bool useAppBar = true, bool automaticallyImplyLeading = true, TextStyle? textStyle, Widget? titleWidget, double? hMargin, double? titleTextSize, FontWeight? fontWeight, bool centerTitle = true, String title = '', double? titleSpacing, EdgeInsets? padding, Widget? bottomNavigationBar, double? leadingWidth, PreferredSizeWidget? bottom, bool useSafeArea = true, List<Widget>? actions, bool resizeToAvoidBottomInset = false, PreferredSize? appBar, IconThemeData? iconTheme}) Widget
获取SafeArea的布局
buildSmartContainer({bool visible = true, BoxConstraints? constraints, bool userClip = false, AlignmentGeometry? alignment, GestureTapCallback? onTap, bool isCircle = false, double borderWidth = 0, Color backgroundColor = Colors.transparent, double radius = 0, Widget? child, EdgeInsets? padding = EdgeInsets.zero, Color borderColor = Colors.transparent, EdgeInsets? margin, BorderRadius? borderRadius, double? height, double? width, HitTestBehavior? behavior, Offset? offset, Color? boxColor, double blurRadius = 0, double spreadRadius = 0, List<BoxShadow>? boxShadow, Widget replacement = const SizedBox.shrink(), bool maintainSize = false, bool maintainAnimation = false, bool maintainState = false}) Widget
胶囊控件
buildText(String text, {TextStyle? textStyle, int? maxLines, double fontSize = 14, Color? color, bool hideIfEmpty = false, EdgeInsets? margin, TextDecoration? textDecoration, TextAlign? textAlign, FontWeight? fontWeight, TextOverflow? overflow}) Widget
buildViewStateWidget(BaseViewState viewState, Function idleWidget, {ViewStateWidgetBuilder? emptyWidgetBuilder, Widget? busyWidget, ViewStateWidgetBuilder? errorWidgetBuilder, Widget? errorDataWidget, bool showErrorWidget = true, bool showEmptyWidget = true, bool showBusyWidget = true}) Widget