ToastManager class

Global toast manager singleton.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toasts List<ToastData>
no setter

Methods

addListener(void listener()) → void
dismiss(String id) → void
dismissAll() → void
error(String message, {String? title, String? description, int duration = 6000, ToastAction? action, Widget? icon, ToastPosition? position}) String
info(String message, {String? title, String? description, int duration = 4000, ToastAction? action, Widget? icon, ToastPosition? position}) String
loading(String message, {String? title, String? description, ToastPosition? position}) String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
promise<T>(Future<T> future, {required String loading, required String success(T), required String error(Object), String? title, ToastPosition? position}) String
removeListener(void listener()) → void
setDefaultPosition(ToastPosition position) → void
success(String message, {String? title, String? description, int duration = 4000, ToastAction? action, Widget? icon, ToastPosition? position}) String
toString() String
A string representation of this object.
inherited
update(String id, ToastData updater(ToastData)) → void
warning(String message, {String? title, String? description, int duration = 5000, ToastAction? action, Widget? icon, ToastPosition? position}) String

Operators

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

Static Properties

instance ToastManager
no setter