BaseScaffold constructor
const
BaseScaffold({
- Key? key,
- Widget? body,
- Widget? child,
- List<
Widget> ? children, - MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
- CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
- Axis direction = Axis.vertical,
- bool safeLeft = false,
- bool safeTop = false,
- bool safeRight = false,
- bool safeBottom = false,
- bool isScroll = false,
- bool isStack = false,
- EdgeInsetsGeometry? padding,
- Decoration? decoration,
- bool useSingleChildScrollView = true,
- EdgeInsetsGeometry? margin,
- RefreshConfig? refreshConfig,
- VoidCallback? onRefresh,
- VoidCallback? onLoading,
- PopInvokedCallback? onPopInvoked,
- bool canPop = true,
- bool isCloseOverlay = false,
- bool enableDoubleClickExit = false,
- String doubleClickExitPrompt = '再次点击返回键退出',
- bool extendBody = false,
- bool extendBodyBehindAppBar = false,
- bool primary = true,
- String? restorationId,
- Widget? floatingActionButton,
- FloatingActionButtonLocation? floatingActionButtonLocation,
- FloatingActionButtonAnimator? floatingActionButtonAnimator,
- Widget? drawer,
- Widget? endDrawer,
- Widget? bottomSheet,
- bool? resizeToAvoidBottomInset,
- DrawerCallback? onDrawerChanged,
- DrawerCallback? onEndDrawerChanged,
- Color? drawerScrimColor,
- DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start,
- double? drawerEdgeDragWidth,
- bool drawerEnableOpenDragGesture = true,
- bool endDrawerEnableOpenDragGesture = true,
- Color? backgroundColor,
- PreferredSizeWidget? appBar,
- double? appBarHeight,
- double? elevation,
- Widget? appBarTitle,
- String? appBarTitleText,
- Widget? appBarAction,
- List<
Widget> ? appBarActions, - Widget? appBarLeading,
- double? leadingWidth,
- Color? appBarBackgroundColor,
- Color? appBarForegroundColor,
- bool appBarPrimary = true,
- PreferredSizeWidget? appBarBottom,
- IconThemeData? appBarIconTheme,
- bool isMaybePop = false,
- bool enableLeading = true,
- SystemUiOverlayStyle? systemOverlayStyle,
- bool centerTitle = true,
- IconThemeData? actionsIconTheme,
- bool automaticallyImplyLeading = true,
- bool excludeHeaderSemantics = true,
- double bottomOpacity = 1.0,
- Widget? flexibleSpace,
- ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
- double? scrolledUnderElevation,
- Color? shadowColor,
- ShapeBorder? shape,
- Color? surfaceTintColor,
- double? titleSpacing,
- TextStyle? titleTextStyle,
- double? toolbarHeight,
- double toolbarOpacity = 1.0,
- TextStyle? toolbarTextStyle,
Implementation
const BaseScaffold({
super.key,
this.body,
this.child,
/// [children].length > 0 [child] invalid
this.children,
/// [children].length > 0 && [isStack]=false invalid;
this.mainAxisAlignment = MainAxisAlignment.start,
/// [children].length > 0 && [isStack]=false invalid;
this.crossAxisAlignment = CrossAxisAlignment.center,
/// [children].length > 0 && [isStack]=false invalid;
this.direction = Axis.vertical,
this.safeLeft = false,
this.safeTop = false,
this.safeRight = false,
this.safeBottom = false,
this.isScroll = false,
this.isStack = false,
this.padding,
this.decoration,
this.useSingleChildScrollView = true,
this.margin,
this.refreshConfig,
/// ****** [Refreshed] ****** ///
this.onRefresh,
this.onLoading,
/// ****** [PopScope] ****** ///
this.onPopInvoked,
this.canPop = true,
this.isCloseOverlay = false,
this.enableDoubleClickExit = false,
this.doubleClickExitPrompt = '再次点击返回键退出',
/// ****** [Scaffold] ****** ///
this.extendBody = false,
this.extendBodyBehindAppBar = false,
this.primary = true,
this.restorationId,
this.floatingActionButton,
/// 悬浮按钮
this.floatingActionButtonLocation,
/// 悬浮按钮位置
this.floatingActionButtonAnimator,
/// 悬浮按钮动画
this.persistentFooterButtons,
/// 固定在下方显示的按钮,比如对话框下方的确定、取消按钮
this.drawer,
/// 侧滑菜单左
this.endDrawer,
/// 侧滑菜单右
this.bottomNavigationBar,
/// 底部导航
this.bottomSheet,
/// 类似于 Android 中的 android:windowSoftInputMode=”adjustResize”,
/// 控制界面内容 body 是否重新布局来避免底部被覆盖了,比如当键盘显示的时候,
/// 重新布局避免被键盘盖住内容。默认值为 true。
this.resizeToAvoidBottomInset,
this.onDrawerChanged,
this.onEndDrawerChanged,
this.drawerScrimColor,
this.drawerDragStartBehavior = DragStartBehavior.start,
this.drawerEdgeDragWidth,
this.drawerEnableOpenDragGesture = true,
this.endDrawerEnableOpenDragGesture = true,
this.backgroundColor,
this.persistentFooterAlignment = AlignmentDirectional.centerEnd,
/// ****** [AppBar] ****** ///
this.appBar,
this.appBarHeight,
this.elevation,
this.appBarTitle,
this.appBarTitleText,
this.appBarAction,
this.appBarActions,
this.appBarLeading,
this.leadingWidth,
this.appBarBackgroundColor,
this.appBarForegroundColor,
this.appBarPrimary = true,
this.appBarBottom,
this.appBarIconTheme,
this.isMaybePop = false,
this.enableLeading = true,
this.systemOverlayStyle,
this.centerTitle = true,
this.actionsIconTheme,
this.automaticallyImplyLeading = true,
this.excludeHeaderSemantics = true,
this.bottomOpacity = 1.0,
this.flexibleSpace,
this.notificationPredicate = defaultScrollNotificationPredicate,
this.scrolledUnderElevation,
this.shadowColor,
this.shape,
this.surfaceTintColor,
this.titleSpacing,
this.titleTextStyle,
this.toolbarHeight,
this.toolbarOpacity = 1.0,
this.toolbarTextStyle,
});