ShowToastAction class final
Shows a short message (a snackbar). Its button (actionLabel) runs actions on the chain that showed it. Cosmetics beyond the fields below (colors, radius, shadows, text styles, offsets per breakpoint) are in style, JSON.
- Inheritance
-
- Object
- ActionDef
- CoreAction
- ShowToastAction
Constructors
-
ShowToastAction({String message = '', String title = '', int durationMs = 2600, ToastStyle toastStyle = ToastStyle.neutral, ToastPosition position = ToastPosition.bottom, String actionLabel = '', List<
ActionDef> actions = const [], bool showClose = false, Json? icon, Json style = const {}, Map<String, String> variables = const {}, bool enabled = true, bool nonBlocking = false, Predicate? when}) -
const
Properties
- actionLabel → String
-
final
-
actions
→ List<
ActionDef> -
final
- durationMs → int
-
final
- enabled → bool
-
False skips the action.
finalinherited
- fieldsJson → Json
-
Its own fields, as JSON (sparse): what toJson writes besides
typeand the common fields. An action class outside this library overrides this.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Json?
-
The icon (an icon glyph's JSON, as icon nodes hold it).
final
- message → String
-
Expressions.
final
-
nested
→ List<
ActionDef> -
The actions it runs itself (branches, follow-ups), in order.
no setteroverride
- nonBlocking → bool
-
The chain doesn't wait for it, and its failure doesn't stop the chain.
finalinherited
- position → ToastPosition
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selfAndNested
→ Iterable<
ActionDef> -
This action, then every action nested in it, depth first.
no setterinherited
- showClose → bool
-
final
- style → Json
-
final
- title → String
-
Expressions.
final
- toastStyle → ToastStyle
-
final
- type → String
-
The JSON
type.no setteroverride -
variables
→ Map<
String, String> -
Style values bound to expressions, by style key.
final
- when → Predicate?
-
Runs only when it holds; null: always.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Json -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited