MiuixFloatingToolbar class
悬浮工具栏。对应 Kotlin FloatingToolbar。
一个自包含容器:内部不安排方向(横/纵由调用方在 child 内自行用
Row/Column 决定)。结构(外→内):外边距 outSidePadding → squircle
背景(可选 0.75dp dividerLine 描边)→ 固定几何阴影 → 内容。
阴影几何是固定的:blurRadius=10、黑色 alpha=0.10、零偏移、零扩散;
shadowElevation 仅作为是否显示阴影的开关(>0 显示),不参与缩放,
这与 MiuixSurface 的阴影参数不同。
通过 GestureDetector(opaque 命中行为)消费点击,避免事件穿透到 工具栏背后的组件;工具栏内部的子按钮仍能在 Flutter 命中竞技场中胜出。
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- MiuixFloatingToolbar
Constructors
- MiuixFloatingToolbar({Key? key, required Widget child, Color? color, double cornerRadius = MiuixFloatingToolbarDefaults.cornerRadius, EdgeInsetsGeometry outSidePadding = MiuixFloatingToolbarDefaults.outSidePadding, double shadowElevation = 4, bool showDivider = false})
-
const
Properties
- child → Widget
-
内容。调用方自行用 Row/Column 等安排布局。
final
- color → Color?
-
背景色。默认取 MiuixFloatingToolbarDefaults.defaultColor。
final
- cornerRadius → double
-
圆角半径(逻辑像素)。
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- outSidePadding → EdgeInsetsGeometry
-
外部留白。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shadowElevation → double
-
阴影高度。仅作为是否显示阴影的开关(>0 显示),阴影几何固定不变。
final
- showDivider → bool
-
是否显示 0.75dp 的
dividerLine描边。final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
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
-
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