BaseScaffold constructor

const BaseScaffold({
  1. Key? key,
  2. Widget? body,
  3. Widget? child,
  4. List<Widget>? children,
  5. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  6. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
  7. Axis direction = Axis.vertical,
  8. bool safeLeft = false,
  9. bool safeTop = false,
  10. bool safeRight = false,
  11. bool safeBottom = false,
  12. bool isScroll = false,
  13. bool isStack = false,
  14. EdgeInsetsGeometry? padding,
  15. Decoration? decoration,
  16. bool useSingleChildScrollView = true,
  17. EdgeInsetsGeometry? margin,
  18. RefreshConfig? refreshConfig,
  19. VoidCallback? onRefresh,
  20. VoidCallback? onLoading,
  21. PopInvokedCallback? onPopInvoked,
  22. bool canPop = true,
  23. bool isCloseOverlay = false,
  24. bool enableDoubleClickExit = false,
  25. String doubleClickExitPrompt = '再次点击返回键退出',
  26. bool extendBody = false,
  27. bool extendBodyBehindAppBar = false,
  28. bool primary = true,
  29. String? restorationId,
  30. Widget? floatingActionButton,
  31. FloatingActionButtonLocation? floatingActionButtonLocation,
  32. FloatingActionButtonAnimator? floatingActionButtonAnimator,
  33. List<Widget>? persistentFooterButtons,
  34. Widget? drawer,
  35. Widget? endDrawer,
  36. Widget? bottomNavigationBar,
  37. Widget? bottomSheet,
  38. bool? resizeToAvoidBottomInset,
  39. DrawerCallback? onDrawerChanged,
  40. DrawerCallback? onEndDrawerChanged,
  41. Color? drawerScrimColor,
  42. DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start,
  43. double? drawerEdgeDragWidth,
  44. bool drawerEnableOpenDragGesture = true,
  45. bool endDrawerEnableOpenDragGesture = true,
  46. Color? backgroundColor,
  47. AlignmentDirectional persistentFooterAlignment = AlignmentDirectional.centerEnd,
  48. PreferredSizeWidget? appBar,
  49. double? appBarHeight,
  50. double? elevation,
  51. Widget? appBarTitle,
  52. String? appBarTitleText,
  53. Widget? appBarAction,
  54. List<Widget>? appBarActions,
  55. Widget? appBarLeading,
  56. double? leadingWidth,
  57. Color? appBarBackgroundColor,
  58. Color? appBarForegroundColor,
  59. bool appBarPrimary = true,
  60. PreferredSizeWidget? appBarBottom,
  61. IconThemeData? appBarIconTheme,
  62. bool isMaybePop = false,
  63. bool enableLeading = true,
  64. SystemUiOverlayStyle? systemOverlayStyle,
  65. bool centerTitle = true,
  66. IconThemeData? actionsIconTheme,
  67. bool automaticallyImplyLeading = true,
  68. bool excludeHeaderSemantics = true,
  69. double bottomOpacity = 1.0,
  70. Widget? flexibleSpace,
  71. ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
  72. double? scrolledUnderElevation,
  73. Color? shadowColor,
  74. ShapeBorder? shape,
  75. Color? surfaceTintColor,
  76. double? titleSpacing,
  77. TextStyle? titleTextStyle,
  78. double? toolbarHeight,
  79. double toolbarOpacity = 1.0,
  80. 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,
});