ToastConfig class

Configuration class for toast appearance and behavior

Constructors

ToastConfig({Duration duration = const Duration(seconds: 3), ToastPosition position = ToastPosition.topRight, ToastAnimation animation = ToastAnimation.slideAndFade, bool showIcon = true, bool showCloseButton = false, double elevation = 6.0, double borderRadius = 12.0, TextStyle? textStyle, double maxWidth = 350.0, EdgeInsetsGeometry margin = const EdgeInsets.all(16.0), EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 12), ToastBehavior behavior = ToastBehavior.stack})
const

Properties

animation ToastAnimation
Animation type for toast
final
behavior ToastBehavior
Behavior when multiple toasts are shown
final
borderRadius double
Border radius of the toast
final
duration Duration
Duration the toast will be displayed
final
elevation double
Elevation of the toast
final
hashCode int
The hash code for this object.
no setterinherited
margin EdgeInsetsGeometry
Margin around the toast
final
maxWidth double
Maximum width of the toast
final
padding EdgeInsetsGeometry
Padding inside the toast
final
position ToastPosition
Position where toast will appear
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showCloseButton bool
Whether to show close button
final
showIcon bool
Whether to show type icon
final
textStyle TextStyle?
Text style for the content
final

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