MiuixScaffold class

Miuix 风格的脚手架。对应 Kotlin Scaffold

实现 Miuix 的基础视觉布局结构:顶栏、底栏、悬浮按钮、悬浮工具栏、Snackbar 与弹窗层。 内容槽 content 会收到脚手架计算出的内边距(顶/底栏高度或系统栏内边距), 由内容自行应用——与 Compose 版一致:body 铺满整个脚手架,栏绘制在其之上。

Inheritance

Constructors

MiuixScaffold({Key? key, Widget? topBar, Widget? bottomBar, Widget? floatingActionButton, MiuixFabPosition floatingActionButtonPosition = MiuixFabPosition.end, Widget? floatingToolbar, MiuixToolbarPosition floatingToolbarPosition = MiuixToolbarPosition.bottomCenter, Widget? snackbarHost, Widget? popupHost, Color? containerColor, EdgeInsets? contentWindowInsets, required MiuixScaffoldContentBuilder content})
const

Properties

bottomBar Widget?
屏幕底部的栏,通常是 MiuixNavigationBar
final
containerColor Color?
脚手架背景色,默认 MiuixTheme.colors.surface;传入透明色可无背景。
final
content MiuixScaffoldContentBuilder
屏幕主体内容。lambda 接收应应用到内容根部的内边距。
final
contentWindowInsets EdgeInsets?
传给 content 的窗口内边距;为 null 时取 MediaQuery.paddingOf(context) (等价于 Kotlin 默认的 systemBars ∪ displayCutout,并已被祖先 SafeArea 扣减)。
final
floatingActionButton Widget?
悬浮操作按钮。
final
floatingActionButtonPosition MiuixFabPosition
悬浮操作按钮的位置,默认 MiuixFabPosition.end
final
floatingToolbar Widget?
悬浮工具栏。
final
floatingToolbarPosition MiuixToolbarPosition
悬浮工具栏的位置,默认 MiuixToolbarPosition.bottomCenter
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
popupHost Widget?
承载弹窗与对话框的组件,默认使用 MiuixPopupHost
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snackbarHost Widget?
承载 Snackbar 的组件,通常是 MiuixSnackbarHost
final
topBar Widget?
屏幕顶部的应用栏,通常是 MiuixTopAppBar
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<MiuixScaffold>
Creates the mutable state for this widget at a given location in the tree.
override
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
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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

Operators

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