MiuixSnackbarHostState class

Snackbar Host 状态。对应 Kotlin SnackbarHostState

每次 showSnackbar 都在队列底部加入一个独立 Snackbar;多个消息可同时 显示。返回的 Future 会在超时、关闭、滑动关闭或操作执行后完成。

Inheritance

Constructors

MiuixSnackbarHostState()

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
inherited
newestSnackbarData() Future<MiuixSnackbarData?>
返回当前最新的可见 Snackbar 数据。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
oldestSnackbarData() Future<MiuixSnackbarData?>
返回当前最旧的可见 Snackbar 数据。
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
showSnackbar(String message, {String? actionLabel, bool withDismissAction = false, MiuixSnackbarDuration duration = MiuixSnackbarDuration.short}) Future<MiuixSnackbarResult>
显示一个 Snackbar。对应 Kotlin showSnackbar
toString() String
A string representation of this object.
inherited

Operators

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