MiuixSnackbar class

Snackbar 卡片。对应 Kotlin Snackbar

blurSigma > 0 时启用高斯模糊半透明材质背景(HyperOS 风格毛玻璃): 用 BackdropFilter 模糊身后内容,叠加半透明 MiuixSnackbarColors.containerColor。 默认 0,保持原版纯色背景。

Inheritance

Constructors

MiuixSnackbar({Key? key, required MiuixSnackbarData data, double cornerRadius = MiuixSnackbarDefaults.cornerRadius, MiuixSnackbarColors? colors, EdgeInsetsGeometry insideMargin = MiuixSnackbarDefaults.insideMargin, double blurSigma = 0.0, double blurBackgroundAlpha = 0.55})
const

Properties

blurBackgroundAlpha double
启用模糊时背景色的不透明度(0~1),默认 0.55。 越小越透,模糊背景内容越可见。
final
blurSigma double
高斯模糊强度(sigma)。> 0 时启用毛玻璃背景,0 为原版纯色背景。
final
colors MiuixSnackbarColors?
卡片颜色;默认取当前 Miuix 主题。
final
cornerRadius double
卡片圆角半径。
final
data MiuixSnackbarData
Snackbar 交互数据。
final
hashCode int
The hash code for this object.
no setterinherited
insideMargin EdgeInsetsGeometry
卡片内部边距。
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

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