MiuixNavigationRail class
适合宽屏使用、可选展开控制器的 Miuix 导航栏。
state 为空时使用经典折叠布局且不显示切换按钮;非空时,栏宽、项目布局、 选中背景和字号共享同一条弹簧动画。项目通过 MiuixNavigationRailItem 自动取得动画信息。背景先于安全区留白绘制,因此可延伸到起始侧系统区域。
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MiuixNavigationRail
Constructors
-
const
Properties
-
children
→ List<
Widget> -
final
- collapseContentDescription → String
-
final
- colors → MiuixNavigationRailColors?
-
final
- defaultWindowInsetsPadding → bool
-
final
- expandContentDescription → String
-
final
- expandedItemVerticalPadding → double
-
展开态项目上下内边距。默认
MiuixNavigationRailDefaults.expandedItemContentVerticalPadding(14)。
减小它可直接降低展开态每项高度。
final
- expandedLabelFontSize → double
-
展开态标签字号。默认 MiuixNavigationRailDefaults.expandedLabelFontSize(16)。
final
- expandedWidth → double
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
final
- iconSize → double
-
项目图标尺寸。默认 MiuixNavigationRailDefaults.iconSize(28,原版值)。
减小它会同时降低项目高度(折叠/展开态都变矮)。
final
- itemVerticalPadding → double
-
折叠态项目上下内边距。默认 MiuixNavigationRailDefaults.itemVerticalPadding(12)。
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- labelFontSize → double
-
折叠态标签字号。默认 MiuixNavigationRailDefaults.labelFontSize(12)。
final
- minWidth → double
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
final
- showDivider → bool
-
final
- state → MiuixNavigationRailState?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< MiuixNavigationRail> -
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