DesignToastDetails class

What the look's DesignToaster.toastBuilder paints one toast from.

Annotations

Constructors

DesignToastDetails({required DesignToast toast, required int index, required int count, required Animation<double> animation, required ValueListenable<double> remaining, required bool paused, required bool exiting, required bool focused, required VoidCallback dismiss, required VoidCallback? runAction})
The details of toast; the toaster makes these.
const

Properties

animation → Animation<double>
0 to 1 as it enters, 1 to 0 as it leaves; on a spring, so it can overshoot 1 (never under Reduce Motion): clamp it before an Opacity, which asserts outside 0 to 1. A swiped toast goes to 0 as its slot closes, so a stack that places toasts by it moves the others up with it.
final
count → int
How many toasts are shown.
final
dismiss → VoidCallback
Dismisses it: for its close control.
final
exiting → bool
Whether it is leaving (timed out, dismissed, acted on, or swiped away).
final
focused → bool
Whether the keyboard moved focus to it (DesignToaster.focusShortcut), for its focus ring.
final
hashCode → int
The hash code for this object.
no setterinherited
index → int
Its place among the shown toasts, oldest first (0).
final
isNewest → bool
Whether it is the newest shown.
no setter
paused → bool
Whether its time is paused (hover, focus, or a screen reader holding an action toast).
final
remaining → ValueListenable<double>
The share of its time left, 1 to 0, in steps of DesignToaster.tick; stays at 1 for a toast without a time. A look that draws it as a bar smooths it itself.
final
runAction → VoidCallback?
Runs its action and closes it; null when it has none.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
toast → DesignToast
The toast.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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