MiuixIcon class
Miuix 风格的图标。对应 Kotlin Icon。
单色图标通过 tint 上色(默认取自 MiuixContentColor);
多色图标传 kMiuixTintUnspecified 以禁用上色,或直接通过 child 传入自定义 Widget。
icon 与 child 二选一:icon 用于 Material 图标字体字形(对应 Kotlin
ImageVector/ImageBitmap 输入),child 用于任意自定义 Widget(对应 Kotlin
Painter 输入,如多色 Image)。
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- MiuixIcon
Constructors
Properties
- child → Widget?
-
自定义图标 Widget(多色图标等)。对应 Kotlin
Painter输入。final - contentDescription → String?
-
无障碍描述。
null时不包裹Semantics(装饰性图标)。 对应 KotlincontentDescription。final - hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
Material 图标数据。对应 Kotlin
ImageVector/ImageBitmap输入。final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → double?
-
图标尺寸。
null时 icon 路径回退到 MiuixIconDefaults.defaultSize, child 路径保留自身尺寸。对应 KotlindefaultSizeFor逻辑。final - tint → Color?
-
上色颜色。
null时取MiuixContentColor.of(context); 传 kMiuixTintUnspecified 时不应用任何 tint(多色图标)。final - vector → MiuixVectorIcon?
-
Miuix 矢量图标(内置 basic / 扩展图标)。对应 Kotlin
ImageVector输入。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