Toast class

Displays a transient overlay message at the bottom of the screen.

Shows the message for duration (default 2 seconds) using the Overlay. Optionally customize backgroundColor and textColor.

Constructors

Toast()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

show(BuildContext context, {required String message, Duration duration = const Duration(seconds: 2), Color? backgroundColor, Color? textColor}) → void
Shows a toast message via the Overlay.