BasicScaffold constructor

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

Implementation

const BasicScaffold({
  super.key,
  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,

  /// ****** [WillPopScope] ****** ///
  this.onWillPop,
  this.isCloseOverlay = false,
  this.isRootPage = false,

  /// ****** [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 = 24,
  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,
});