ToastConfig constructor
const
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,
Implementation
const ToastConfig({
this.duration = const Duration(seconds: 3),
this.position = ToastPosition.topRight,
this.animation = ToastAnimation.slideAndFade,
this.showIcon = true,
this.showCloseButton = false,
this.elevation = 6.0,
this.borderRadius = 12.0,
this.textStyle,
this.maxWidth = 350.0,
this.margin = const EdgeInsets.all(16.0),
this.padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
this.behavior = ToastBehavior.stack,
});