RistoToast class
Centralized toast/overlay notifier (never uses SnackBar). Works anywhere (pages, dialogs, popup) because it uses Overlay.
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, {required String message, Duration duration = const Duration(seconds: 4), bool top = false, int maxLines = 4, double? iconSize, TextStyle? textStyle, Color? backgroundColor, Color? textColor, Color? shadowColor}) → void - Helper for an ERROR toast.
-
hide(
) → void - Programmatically hide the current toast (if any) with an exit animation.
-
info(
BuildContext context, {required String message, Duration duration = const Duration(seconds: 2), bool top = false, int maxLines = 4, double? iconSize, TextStyle? textStyle, Color? backgroundColor, Color? textColor, Color? shadowColor}) → void - Helper for an INFO toast.
-
show(
BuildContext context, {required String message, Color backgroundColor = const Color(0xE6000000), Color textColor = Colors.white, TextStyle? textStyle, IconData? icon, double? iconSize, Duration duration = const Duration(seconds: 2), EdgeInsets margin = const EdgeInsets.symmetric(horizontal: 24, vertical: 64), EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 12), double radius = 12.0, double elevation = 2.0, Color? shadowColor, Color? borderColor, double borderWidth = 1.0, bool top = false, int maxLines = 4, TextOverflow overflow = TextOverflow.ellipsis}) → void - Base overlay toast.
-
success(
BuildContext context, {required String message, Duration duration = const Duration(seconds: 2), bool top = false, int maxLines = 4, double? iconSize, TextStyle? textStyle, Color? backgroundColor, Color? textColor, Color? shadowColor}) → void - Helper for a SUCCESS toast.
-
warning(
BuildContext context, {required String message, Duration duration = const Duration(seconds: 3), bool top = false, int maxLines = 4, double? iconSize, TextStyle? textStyle, Color? backgroundColor, Color? textColor, Color? shadowColor}) → void - Helper for a WARNING toast.