alerts/src/toast_meta library
Classes
- ToastAnimation
- ToastAnimation defines animation styles for toast notifications. Use factory constructors to create different animation effects.
- ToastMeta
- Toast Meta makes it easy to use pre-defined styles in the toast alert.
- ToastNotificationRegistry
- Registry for toast notification styles. Stores widget factories keyed by string IDs (e.g., "success", "warning"). Use ToastNotificationRegistry.register to add custom toast styles.
Enums
- ToastAnimationType
- Animation type for toast notifications.
- ToastNotificationPosition
- Position where the toast notification appears.
Typedefs
- ToastOnInitStateCallback = dynamic Function(Duration toastDuration, Duration animDuration)
-
Callback for the toast widget's
initStatelifecycle hook. Receives the toast displaydurationand animationanimDuration. - ToastStyleFactory = Widget Function(ToastMeta meta, void updateMeta(ToastMeta))
-
Typedef for toast style factory function.
The factory receives the ToastMeta and an
updateMetacallback to allow the widget to update position, duration, etc.