ToastQueueManager class

Manages the queue and positioning of toast notifications

Handles multiple simultaneous toasts with intelligent positioning, stacking, and lifecycle management following the same patterns as DialogQueueManager and SnackbarQueueManager.

Properties

activeCount int
Number of currently active toasts
no setter
activeToastIds List<String>
Get all active toast IDs
no setter
activeToastStates List<ToastState>
Get all active toast states
no setter
hashCode int
The hash code for this object.
no setterinherited
isPaused bool
Whether the queue is paused
no setter
maxToasts int
Maximum number of simultaneous toasts
getter/setter pair
queuedCount int
Number of toasts waiting in queue
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stateStream Stream<ToastState>
Stream of toast state changes
no setter

Methods

clearQueue() → void
Clear the queue without dismissing active toasts
disableDebugMode() → void
Disable debug mode
dismissAllToasts({String reason = 'dismiss_all'}) int
Dismiss all active toasts
dismissToast(String toastId, {String reason = 'user_dismissed'}) bool
Dismiss a specific toast
dismissToastsByTag(String tag) int
Dismiss toasts by tag
dismissToastsByType(ToastType toastType) int
Dismiss toasts by type
dispose() → void
Dispose of resources
enableDebugMode() → void
Enable debug mode
enqueue({required BuildContext context, required ToastConfig config, required Future<ToastResult?> toastBuilder(String toastId)}) Future<ToastResult?>
Enqueue a toast for display
getDebugInfo() Map<String, Object?>
Get debug information
isToastActive(String toastId) bool
Check if a toast is active
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pauseAutoDismiss() → void
Pause auto-dismiss for all toasts
resumeAutoDismiss() → void
Resume auto-dismiss for all toasts
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance ToastQueueManager
Singleton instance
no setter
isInitialized bool
Check if singleton is initialized
no setter

Static Methods

initialize() → void
Initialize the singleton instance explicitly