BaseScaffold<T> class

BaseScaffold

Inheritance
Available extensions

Constructors

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, double spacing = 0.0, EdgeInsetsGeometry? padding, BoxDecoration? decoration, EdgeInsetsGeometry? margin, Clip? clipBehavior, ScrollPhysics? physics, bool canPop = true, bool canHideOverlay = true, bool enableDoubleClickExit = false, String doubleClickExitPrompt = '再次点击返回键退出', bool extendBody = false, bool extendBodyBehindAppBar = false, bool primary = true, Widget? floatingActionButton, FloatingActionButtonLocation? floatingActionButtonLocation, FloatingActionButtonAnimator? floatingActionButtonAnimator, List<Widget>? persistentFooterButtons, Widget? drawer, bool drawerEnableOpenDragGesture = true, DrawerCallback? onDrawerChanged, Widget? endDrawer, bool endDrawerEnableOpenDragGesture = true, DrawerCallback? onEndDrawerChanged, Widget? bottomNavigationBar, Widget? bottomSheet, bool? resizeToAvoidBottomInset, Color? drawerScrimColor, DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start, double? drawerEdgeDragWidth, Color? backgroundColor, AlignmentDirectional persistentFooterAlignment = AlignmentDirectional.centerEnd, String? restorationId, PreferredSizeWidget? appBar, double? appBarHeight, double? elevation, Widget? appBarTitle, String? appBarTitleText, List<Widget>? appBarActions, Widget? appBarLeading, double? leadingWidth, Color? appBarBackgroundColor, Color? appBarForegroundColor, bool appBarPrimary = true, PreferredSizeWidget? appBarBottom, IconThemeData? appBarIconTheme, SystemUiOverlayStyle? systemOverlayStyle, bool centerTitle = true, IconThemeData? actionsIconTheme, bool automaticallyImplyLeading = true, bool excludeHeaderSemantics = true, double bottomOpacity = 1.0, Widget? appBarFlexibleSpace, ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate, double? scrolledUnderElevation, Color? shadowColor, ShapeBorder? shape, Color? surfaceTintColor, double? titleSpacing, TextStyle? titleTextStyle, double? toolbarHeight, double toolbarOpacity = 1.0, TextStyle? toolbarTextStyle, bool forceMaterialTransparency = false, PopInvokedWithResultAndOverlayCallback<T>? onPopInvokedWithResult})
const

Properties

actionsIconTheme IconThemeData?
final
appBar PreferredSizeWidget?
appBar
final
appBarActions List<Widget>?
final
appBarBackgroundColor Color?
final
appBarBottom PreferredSizeWidget?
final
appBarFlexibleSpace Widget?
final
appBarForegroundColor Color?
final
appBarHeight double?
限制 appBar 高度
final
appBarIconTheme IconThemeData?
final
appBarLeading Widget?
final
appBarPrimary bool
final
appBarTitle Widget?
final
appBarTitleText String?
final
automaticallyImplyLeading bool
final
backgroundColor Color?
Scaffold相关属性
final
body Widget?
body > child > children
final
bottomNavigationBar Widget?
底部导航条
final
bottomOpacity double
final
bottomSheet Widget?
一个持久停留在body下方,底部控件上方的控件
final
canHideOverlay bool
canHideOverlay=true pop 先关闭 FlOverlayEntry,toast, loading ...
final
canPop bool
final
centerTitle bool
final
child Widget?
child
final
children List<Widget>?
相当于给child 套用 ColumnRowStack
final
clipBehavior Clip?
final
crossAxisAlignment CrossAxisAlignment
children.length > 0 && isStack=false 有效;
final
decoration BoxDecoration?
final
direction Axis
children.length > 0 && isStack=false 有效;
final
doubleClickExitPrompt String
final
drawer Widget?
左侧菜单
final
drawerDragStartBehavior DragStartBehavior
控制 drawer 的一些特性
final
drawerEdgeDragWidth double?
侧滑栏拉出来的宽度
final
drawerEnableOpenDragGesture bool
左侧侧滑栏是否可以滑动
final
drawerScrimColor Color?
侧滑栏拉出来时,用来遮盖主页面的颜色
final
elevation double?
****** AppBar ****** ///
final
enableDoubleClickExit bool
final
endDrawer Widget?
右侧菜单
final
endDrawerEnableOpenDragGesture bool
右侧侧滑栏是否可以滑动
final
excludeHeaderSemantics bool
final
expand SizedBox

Available on Widget, provided by the ExtensionWidget extension

no setter
expanded Expanded

Available on Widget, provided by the ExtensionWidget extension

no setter
extendBody bool
默认 false,为 true 时, body 延伸到底部控件
final
extendBodyBehindAppBar bool
默认 false,为 true 时,body 会置顶到 appbar 后,如appbar 为半透明色,可以有毛玻璃效果
final
flexible Flexible

Available on Widget, provided by the ExtensionWidget extension

no setter
floatingActionButton Widget?
悬浮按钮
final
floatingActionButtonAnimator FloatingActionButtonAnimator?
悬浮按钮位置
final
floatingActionButtonLocation FloatingActionButtonLocation?
悬浮按钮
final
forceMaterialTransparency bool
final
hashCode int
The hash code for this object.
no setterinherited
isScroll bool
是否添加滚动组件
final
isStack bool
children.length > 0有效; 添加 Stack组件
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leadingWidth double?
final
mainAxisAlignment MainAxisAlignment
children.length > 0 && isStack=false 有效;
final
margin EdgeInsetsGeometry?
final
notificationPredicate ScrollNotificationPredicate
final
onDrawerChanged DrawerCallback?
final
onEndDrawerChanged DrawerCallback?
final
onPopInvokedWithResult PopInvokedWithResultAndOverlayCallback<T>?
final
padding EdgeInsetsGeometry?
final
persistentFooterAlignment AlignmentDirectional
final
persistentFooterButtons List<Widget>?
显示在底部导航条上方的一组按钮
final
physics ScrollPhysics?
final
primary bool
是否在屏幕顶部显示Appbar, 默认为 true,Appbar 是否向上延伸到状态栏,如电池电量,时间那一栏
final
resizeToAvoidBottomInset bool?
默认为 true,防止一些小组件重复
final
restorationId String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safeBottom bool
final
safeLeft bool
****** SafeArea ****** ///
final
safeRight bool
final
safeTop bool
final
scrolledUnderElevation double?
final
shadowColor Color?
final
shape ShapeBorder?
final
shrink SizedBox

Available on Widget, provided by the ExtensionWidget extension

no setter
spacing double
ColumnRow 的间距
final
surfaceTintColor Color?
final
systemOverlayStyle SystemUiOverlayStyle?
在不设置AppBar的时候 修改状态栏颜色
final
titleSpacing double?
final
titleTextStyle TextStyle?
final
toExpansionTilesRotationIconBuilder ExpansionTilesRotationIconBuilder

Available on Widget, provided by the ExtensionExpansionTiles extension

no setter
toLoadingBuilder LoadingBuilder

Available on Widget, provided by the ExtensionWidget extension

no setter
toolbarHeight double?
final
toolbarOpacity double
final
toolbarTextStyle TextStyle?
final
toRoutePageBuilder RoutePageBuilder

Available on Widget, provided by the ExtensionWidget extension

no setter
toRouteTransitionsBuilder RouteTransitionsBuilder

Available on Widget, provided by the ExtensionWidget extension

no setter
toSliverBox Widget

Available on Widget, provided by the ExtensionWidget extension

no setter
toToastBuilder ToastBuilder

Available on Widget, provided by the ExtensionWidget extension

no setter
toToggleRotateIconBuilder ToggleRotateIconBuilder

Available on Widget, provided by the ExtensionWidgetToggleRotate extension

no setter
toWidgetBuilder WidgetBuilder

Available on Widget, provided by the ExtensionWidget extension

no setter
universal Universal
no setter

Methods

align({Key? key, Alignment alignment = Alignment.center, double? widthFactor, double? heightFactor}) Align

Available on Widget, provided by the ExtensionWidget extension

aspectRatio(double aspectRatio, {Key? key}) AspectRatio

Available on Widget, provided by the ExtensionWidget extension

backdropFilter({Key? key, ImageFilter? filter, double fuzzyDegree = 4}) BackdropFilter

Available on Widget, provided by the ExtensionWidget extension

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
buildAppBar(BuildContext context) PreferredSizeWidget?
buildPopScope(Widget current) Widget
card({Color? color, Color? shadowColor, double? elevation, ShapeBorder? shape, bool? borderOnForeground, EdgeInsetsGeometry? margin, Clip? clipBehavior, bool? semanticContainer}) Card

Available on Widget, provided by the ExtensionWidget extension

center({Key? key, double? widthFactor, double? heightFactor}) Center

Available on Widget, provided by the ExtensionWidget extension

clipOval({Key? key, BorderRadius borderRadius = BorderRadius.zero, CustomClipper<Rect>? clipper, Clip clipBehavior = Clip.antiAlias}) ClipOval

Available on Widget, provided by the ExtensionWidget extension

clipPath({Key? key, BorderRadius borderRadius = BorderRadius.zero, CustomClipper<Path>? clipper, Clip clipBehavior = Clip.antiAlias}) ClipPath

Available on Widget, provided by the ExtensionWidget extension

clipRRect({Key? key, BorderRadius borderRadius = BorderRadius.zero, CustomClipper<RRect>? clipper, Clip clipBehavior = Clip.antiAlias}) ClipRRect

Available on Widget, provided by the ExtensionWidget extension

color(Color color, {Key? key}) ColoredBox

Available on Widget, provided by the ExtensionWidget extension

constrainedBox(BoxConstraints constraints, {Key? key}) ConstrainedBox

Available on Widget, provided by the ExtensionWidget extension

container({Key? key, EdgeInsetsGeometry? padding, Decoration? foregroundDecoration, Matrix4? transform, BoxConstraints? constraints, Color? color, double? width, double? height, EdgeInsetsGeometry? margin, Decoration? decoration, Clip? clipBehavior, AlignmentGeometry? alignment}) Container

Available on Widget, provided by the ExtensionWidget extension

createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
decoratedBox(Decoration decoration, {Key? key, DecorationPosition position = DecorationPosition.background}) DecoratedBox

Available on Widget, provided by the ExtensionWidget extension

fittedBox({Key? key, BoxFit fit = BoxFit.contain, AlignmentGeometry alignment = Alignment.center, Clip clipBehavior = Clip.none}) FittedBox

Available on Widget, provided by the ExtensionWidget extension

fromSize(Size size, {Key? key}) SizedBox

Available on Widget, provided by the ExtensionWidget extension

gestureDetector({Key? key, GestureTapDownCallback? onTapDown, GestureTapUpCallback? onTapUp, GestureTapCallback? onTap, GestureTapCancelCallback? onTapCancel, GestureTapDownCallback? onSecondaryTapDown, GestureTapUpCallback? onSecondaryTapUp, GestureTapCancelCallback? onSecondaryTapCancel, GestureTapCallback? onDoubleTap, GestureLongPressCallback? onLongPress, GestureLongPressStartCallback? onLongPressStart, GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate, GestureLongPressUpCallback? onLongPressUp, GestureLongPressEndCallback? onLongPressEnd, GestureDragDownCallback? onVerticalDragDown, GestureDragStartCallback? onVerticalDragStart, GestureDragUpdateCallback? onVerticalDragUpdate, GestureDragEndCallback? onVerticalDragEnd, GestureDragCancelCallback? onVerticalDragCancel, GestureDragDownCallback? onHorizontalDragDown, GestureDragStartCallback? onHorizontalDragStart, GestureDragUpdateCallback? onHorizontalDragUpdate, GestureDragEndCallback? onHorizontalDragEnd, GestureDragCancelCallback? onHorizontalDragCancel, GestureForcePressStartCallback? onForcePressStart, GestureForcePressPeakCallback? onForcePressPeak, GestureForcePressUpdateCallback? onForcePressUpdate, GestureForcePressEndCallback? onForcePressEnd, GestureDragDownCallback? onPanDown, GestureDragStartCallback? onPanStart, GestureDragUpdateCallback? onPanUpdate, GestureDragEndCallback? onPanEnd, GestureDragCancelCallback? onPanCancel, GestureScaleStartCallback? onScaleStart, GestureScaleUpdateCallback? onScaleUpdate, GestureScaleEndCallback? onScaleEnd, HitTestBehavior? behavior, bool excludeFromSemantics = false, DragStartBehavior dragStartBehavior = DragStartBehavior.start, Set<PointerDeviceKind>? supportedDevices, bool trackpadScrollCausesScale = false, Offset trackpadScrollToScaleFactor = kDefaultTrackpadScrollToScaleFactor}) GestureDetector

Available on Widget, provided by the ExtensionWidget extension

hero(Object tag, {Key? key, CreateRectTween? createRectTween, HeroFlightShuttleBuilder? flightShuttleBuilder, HeroPlaceholderBuilder? placeholderBuilder, bool transitionOnUserGestures = false}) Hero

Available on Widget, provided by the ExtensionWidget extension

interceptNotificationListener<T extends Notification>({NotificationListenerCallback<T>? onNotification}) Widget

Available on Widget, provided by the ExtensionNotificationListener extension

limitedBox({Key? key, double maxWidth = double.infinity, double maxHeight = double.infinity}) LimitedBox

Available on Widget, provided by the ExtensionWidget extension

margin(EdgeInsetsGeometry margin, {Key? key}) Padding

Available on Widget, provided by the ExtensionWidget extension

marginAll(double margin) Widget

Available on Widget, provided by the ExtensionWidget extension

marginOnly({double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) Widget

Available on Widget, provided by the ExtensionWidget extension

marginSymmetric({double horizontal = 0.0, double vertical = 0.0}) Widget

Available on Widget, provided by the ExtensionWidget extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offstage(bool offstage, {Key? key}) Offstage

Available on Widget, provided by the ExtensionWidget extension

onDoubleTap(GestureTapCallback onDoubleTap, {Key? key}) GestureDetector

Available on Widget, provided by the ExtensionWidget extension

onLongPress(GestureLongPressCallback onLongPress, {Key? key}) GestureDetector

Available on Widget, provided by the ExtensionWidget extension

onTap(GestureTapCallback? onTap, {Key? key}) GestureDetector

Available on Widget, provided by the ExtensionWidget extension

overflowBox({Key? key, Alignment alignment = Alignment.center, double? minWidth, double? maxWidth, double? minHeight, double? maxHeight}) OverflowBox

Available on Widget, provided by the ExtensionWidget extension

padding(EdgeInsetsGeometry padding) Padding

Available on Widget, provided by the ExtensionWidget extension

paddingAll(double padding) Widget

Available on Widget, provided by the ExtensionWidget extension

paddingOnly({double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) Widget

Available on Widget, provided by the ExtensionWidget extension

paddingSymmetric({double horizontal = 0.0, double vertical = 0.0}) Widget

Available on Widget, provided by the ExtensionWidget extension

popupCupertinoModal<T>({WidgetBuilder? builder, CupertinoModalPopupOptions? options}) Future<T?>

Available on Widget, provided by the ExtensionWidgetMethod extension

全屏显示 showCupertinoModalPopup
popupGeneralDialog<T>({RoutePageBuilder? builder, GeneralDialogOptions? options}) Future<T?>

Available on Widget, provided by the ExtensionWidgetMethod extension

showGeneralDialog
popupModalBottomSheet<T>({WidgetBuilder? builder, ModalBottomSheetOptions? options}) Future<T?>

Available on Widget, provided by the ExtensionWidgetMethod extension

showModalBottomSheet 关闭 closePopup()
positioned({Key? key, double? left, double? top, double? right, double? bottom, double? width, double? height}) Positioned

Available on Widget, provided by the ExtensionWidget extension

push<T extends Object?>(Widget widget, {PageRouteOptions options = const PageRouteOptions.material()}) Future<T?>

Available on Widget, provided by the ExtensionWidgetMethod extension

push
pushAndRemoveUntil<T extends Object?>(Widget widget, {PageRouteOptions options = const PageRouteOptions.material(), required RoutePredicate predicate}) Future<T?>

Available on Widget, provided by the ExtensionWidgetMethod extension

pushAndRemoveUntil
pushReplacement<T extends Object?, TO extends Object?>(Widget widget, {PageRouteOptions options = const PageRouteOptions.material(), TO? result}) Future<T?>

Available on Widget, provided by the ExtensionWidgetMethod extension

pushReplacement
rotatedBox(int quarterTurns, {Key? key}) RotatedBox

Available on Widget, provided by the ExtensionWidget extension

setHeight(double height, {Key? key}) SizedBox

Available on Widget, provided by the ExtensionWidget extension

setPreferredHeight(double height, {Key? key}) PreferredSize

Available on Widget, provided by the ExtensionWidget extension

setPreferredSize(Size size, {Key? key}) PreferredSize

Available on Widget, provided by the ExtensionWidget extension

setPreferredWidth(double width, {Key? key}) PreferredSize

Available on Widget, provided by the ExtensionWidget extension

setSize(Size size, {Key? key}) SizedBox

Available on Widget, provided by the ExtensionWidget extension

setWidth(double width, {Key? key}) SizedBox

Available on Widget, provided by the ExtensionWidget extension

showOverlay({bool isCached = true}) FlOverlayEntry?

Available on Widget, provided by the ExtensionWidgetMethod extension

FlOverlay().show()
sizedBox({Key? key, double? width, double? height}) SizedBox

Available on Widget, provided by the ExtensionWidget extension

sizedOverflowBox(Size size, {Key? key, Alignment alignment = Alignment.center}) SizedOverflowBox

Available on Widget, provided by the ExtensionWidget extension

statusBarStyle(SystemUiOverlayStyle style) AnnotatedRegion<SystemUiOverlayStyle>

Available on Widget, provided by the ExtensionWidget extension

toDecoratorPendant<T>({DecoratorPendantPosition positioned = DecoratorPendantPosition.outer, bool maintainSize = false, bool? needFocus, bool? needEditing, DecoratorPendantValueCallback<T?>? needValue}) DecoratorPendant<T>

Available on Widget, provided by the ExtensionWidgetDecoratorBox extension

toDecoratorPendantBuilder<T>({DecoratorPendantPosition positioned = DecoratorPendantPosition.outer, bool maintainSize = false, bool? needFocus, bool? needEditing, DecoratorPendantValueCallback<T?>? needValue}) DecoratorPendant<T>

Available on Widget, provided by the ExtensionWidgetDecoratorBox extension

toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited
toTextFieldPendant({DecoratorPendantPosition positioned = DecoratorPendantPosition.outer, bool maintainSize = false, bool? needFocus, bool? needEditing, DecoratorPendantValueCallback<TextEditingController?>? needValue}) TextFieldPendant

Available on Widget, provided by the ExtensionWidgetTextFieldPendant extension

toTextFieldPendantBuilder({DecoratorPendantPosition positioned = DecoratorPendantPosition.outer, bool maintainSize = false, bool? needFocus, bool? needEditing, DecoratorPendantValueCallback<TextEditingController?>? needValue}) TextFieldPendant

Available on Widget, provided by the ExtensionWidgetTextFieldPendant extension

unconstrainedBox({Key? key, TextDirection? textDirection, Alignment alignment = Alignment.center, Axis? constrainedAxis}) UnconstrainedBox

Available on Widget, provided by the ExtensionWidget extension

visibility(bool visible, {Key? key}) Visibility

Available on Widget, provided by the ExtensionWidget extension

Operators

operator ==(Object other) bool
The equality operator.
inherited