DevToast class

A utility class for displaying toast notifications within the app.

Use DevToast.show for custom toasts or convenience methods like success, error, warning, and info.

Constructors

DevToast()

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

error(BuildContext context, String message) → void
Shows an error toast (red background with error icon).
info(BuildContext context, String message) → void
Shows an info toast (blue background with info icon).
show(BuildContext context, String message, {Duration duration = const Duration(seconds: 2), Color? backgroundColor, Color? textColor, IconData? icon, Map<String, dynamic>? metadata}) → void
Shows a customizable toast notification.
success(BuildContext context, String message) → void
Shows a success toast (green background with check icon).
warning(BuildContext context, String message) → void
Shows a warning toast (orange background with warning icon).