Toastly class
A singleton toast manager for showing customizable, animated overlays.
Use Toastly.init once in your app to initialize the instance with a TickerProvider or a custom AnimationController.
Then, call Toastly.instance.show
to display a toast.
- Available extensions
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
hide(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
show(
{required ToastlyConfig config, required BuildContext context, VoidCallback? onToastTap, VoidCallback? onDismiss}) → void -
Displays a toast overlay with the given
config
in the providedcontext
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
init(
{TickerProvider? vsync, AnimationController? animationController, ToastlyStackMode stackMode = ToastlyStackMode.replace}) → void - Initializes the Toastly singleton.