ToastConfig constructor

const ToastConfig({
  1. Duration duration = const Duration(seconds: 3),
  2. ToastPosition position = ToastPosition.topRight,
  3. ToastAnimation animation = ToastAnimation.slideAndFade,
  4. bool showIcon = true,
  5. bool showCloseButton = false,
  6. double elevation = 6.0,
  7. double borderRadius = 12.0,
  8. TextStyle? textStyle,
  9. double maxWidth = 350.0,
  10. EdgeInsetsGeometry margin = const EdgeInsets.all(16.0),
  11. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
  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,
});