BeuiAnimatedToastStack class

A stacked toast list with status morphs, swipe dismissal and layout-aware motion — the Flutter port of beUI's AnimatedToastStack.

Controlled: the consumer owns toasts (typically via BeuiToastController) and reacts to onDismiss. Removed toasts animate out (slide right + blur, faster than the entrance) before unmounting; new toasts spring in from below while the stack glides to make room (source layout + STACK_SPRING).

Reduced motion keeps the opacity fades and drops all movement, blur and swipe-to-dismiss (source useReducedMotion() branches).

Inheritance

Constructors

BeuiAnimatedToastStack({required List<BeuiToast> toasts, ValueChanged<String>? onDismiss, BeuiToastPosition position = BeuiToastPosition.bottomRight, int maxVisible = 4, double maxWidth = 384, Map<BeuiToastStatus, Widget>? icons, Widget toastBuilder(BuildContext context, BeuiToast toast)?, Key? key})
Creates a toast stack.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
icons Map<BeuiToastStatus, Widget>?
Per-status icon overrides for the whole stack (source icons).
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxVisible int
How many of the newest toasts are rendered (source maxVisible).
final
maxWidth double
Stack width cap (source max-w-sm = 384).
final
onDismiss ValueChanged<String>?
Called with a toast id when its close button is pressed or it is swiped away. The consumer removes it from toasts. Without this, toasts are not dismissible by the user.
final
position BeuiToastPosition
Stacking direction (source position); see BeuiToastPosition.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toastBuilder Widget Function(BuildContext context, BeuiToast toast)?
Replaces a toast's default surface content entirely (source renderToast). The enter/exit/swipe motion still applies.
final
toasts List<BeuiToast>
The toasts, oldest first (source toasts).
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<BeuiAnimatedToastStack>
Creates the mutable state for this widget at a given location in the tree.
override
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