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, double hMargin, EdgeInsets actionsEdgeInsets, EdgeInsets leadingEdgeInsets, AlignmentGeometry actionsAlign, AlignmentGeometry leadingAlign}) Widget
公共控件/
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}) Widget
阴影框
buildConnerNetworkImage({LoadStateChanged loadStateChanged, bool enableLoadState = false, bool cache = true, bool enableMemoryCache = true, bool clearMemoryCacheIfFailed = true, String url, double width, double height, bool isCircle = false, double radius = 5, BoxFit fit = BoxFit.fill}) Widget
圆角图片
buildDioWidget({Future<HttpData> request, Widget busyWidget, bool rememberFutureResult, DioWidgetBuilder idleWidgetBuilder, DioWidgetBuilder errorWidgetBuilder}) Widget
buildFlexRowWidget({Widget leftWidget, Widget rightWidgetTopWidget, Widget rightBottomWidget, double divider}) Widget
获取以左侧为高度,右侧控件为上下对齐的布局
buildListViewSeparated({bool closeToTrailing = false, bool useKeFrame = true, ViewPortBuilder viewportBuilder, int itemCount, 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}) Widget
间隔listview
buildNoDataWidget({BaseViewState viewStateModel, Widget child, GestureDetector onTap}) Widget
buildRefreshNoDataWidget({BaseViewState viewState, Widget busyWidget, ViewStateWidgetBuilder emptyWidgetBuilder, ViewStateWidgetBuilder errorWidgetBuilder, bool showErrorWidget = true, bool showEmptyWidget = true, bool showBusyWidget = true}) Widget
buildScaffoldWidget({Widget body, double mToolBarHeight, Color backgroundColor, Color appBarBackColor, Widget leading, bool useAppBar = true, bool automaticallyImplyLeading, 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, EdgeInsets actionsEdgeInsets, EdgeInsets leadingEdgeInsets, AlignmentGeometry actionsAlign, AlignmentGeometry leadingAlign}) Widget
获取SafeArea的布局
buildSmartContainer({bool visible = true, BoxConstraints constraints, bool userClip = false, AlignmentGeometry alignment, GestureTapCallback onTap, bool isCircle = false, double borderWidth = 0, Color backgroundColor = Colors.white, double radius = 0, Widget child, EdgeInsets padding, Color borderColor = Colors.white, EdgeInsets margin, BorderRadiusGeometry borderRadius, double height, double width, HitTestBehavior behavior}) Widget
胶囊控件
buildText(String text, {TextStyle textStyle, int maxLines, double fontSize = 14, Color color, EdgeInsets margin, TextDecoration textDecoration, TextAlign textAlign, FontWeight fontWeight, TextOverflow overflow}) Widget
buildTextField({TextEditingController controller, Color cursorColor, double hintFontSize = 12, TextStyle hintStyle, bool autofocus = false, InputDecoration decoration, String hintText, int maxLength, EdgeInsets margin, TextAlign textAlign = TextAlign.left, bool enabled = true, double fontSize = 14, TextInputType textInputType, int maxLines, List<TextInputFormatter> textInputFormatters, FocusNode focusNode, bool obscureText, TextStyle textStyle}) Widget
buildTextWithClearField(TextEditingController textEditingController, double suffixIconSize, {FocusNode focusNode, int maxLines, String hintText, int maxLength, EdgeInsets margin, TextAlign textAlign = TextAlign.left, bool enabled = true, double fontSize = 14, IconData clearIcon, Widget icon}) Widget
buildViewStateWidget(BaseViewState viewState, Function idleWidget, {ViewStateWidgetBuilder emptyWidgetBuilder, Widget busyWidget, ViewStateWidgetBuilder errorWidgetBuilder, Widget errorDataWidget, bool showErrorWidget = true, bool showEmptyWidget = true, bool showBusyWidget = true}) Widget