CSToast class
Toast manager for displaying toast messages
Constructors
- CSToast()
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 Properties
- activeCount → int
-
Get count of active toasts
no setter
- defaultConfig ↔ ToastConfig
-
getter/setter pair
- queueLength → int
-
Get count of queued toasts
no setter
Static Methods
-
clearAll(
) → void - Clear all active toasts and queue
-
custom(
BuildContext context, {required String message, required Color backgroundColor, ToastPosition? position, Color textColor = Colors.white, IconData? icon, Duration? duration, bool? showCloseButton, ToastBehavior? behavior, VoidCallback? onTap}) → void - Show custom toast with custom colors
-
error(
BuildContext context, String message, {ToastPosition? position, Duration? duration, bool? showIcon, VoidCallback? onTap}) → void - Show error toast
-
info(
BuildContext context, String message, {ToastPosition? position, Duration? duration, bool? showIcon, VoidCallback? onTap}) → void - Show info toast
-
show(
BuildContext context, {required String message, ToastType type = ToastType.info, ToastPosition? position, ToastAnimation? animation, Duration? duration, Color? backgroundColor, Color? textColor, TextStyle? textStyle, bool? showIcon, bool? showCloseButton, double? elevation, double? borderRadius, double? maxWidth, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, ToastBehavior? behavior, VoidCallback? onTap, VoidCallback? onDismiss}) → void - Show a toast with full customization
-
success(
BuildContext context, String message, {ToastPosition? position, Duration? duration, bool? showIcon, VoidCallback? onTap}) → void - Show success toast
-
updateDefaultConfig(
ToastConfig config) → void - Update default configuration
-
warning(
BuildContext context, String message, {ToastPosition? position, Duration? duration, bool? showIcon, VoidCallback? onTap}) → void - Show warning toast