ToastNotificationRegistry class
Registry for toast notification styles. Stores widget factories keyed by string IDs (e.g., "success", "warning"). Use ToastNotificationRegistry.register to add custom toast styles.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
styles
→ Map<
String, ToastStyleFactory> -
Get all registered toast styles.
no setter
Methods
-
clear(
) → void - Clear all registered styles (useful for testing).
-
get(
String id) → ToastStyleFactory? -
Get a toast widget factory by
id. Returns the "success" factory with a debug warning ifidis not found. -
has(
String id) → bool -
Check if a toast style with
idexists. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
String id, ToastStyleFactory factory) → void -
Register a single toast style with the given
id. -
registerAll(
Map< String, ToastStyleFactory> styles) → void - Register multiple toast styles at once.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → ToastNotificationRegistry
-
final