ToastNotification constructor

const ToastNotification({
  1. Key? key,
  2. required String message,
  3. Duration duration = const Duration(seconds: 3),
  4. Color backgroundColor = Colors.black,
  5. Color textColor = Colors.white,
  6. double borderRadius = 8.0,
  7. IconData? icon,
  8. Color? iconColor,
  9. VoidCallback? onDismissed,
  10. bool showProgress = false,
  11. ToastPosition position = ToastPosition.bottom,
  12. double elevation = 4.0,
  13. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 16.0, vertical: 10.0),
  14. double? width,
})

Implementation

const ToastNotification({
  super.key,
  required this.message,
  this.duration = const Duration(seconds: 3),
  this.backgroundColor = Colors.black,
  this.textColor = Colors.white,
  this.borderRadius = 8.0,
  this.icon,
  this.iconColor,
  this.onDismissed,
  this.showProgress = false,
  this.position = ToastPosition.bottom,
  this.elevation = 4.0,
  this.padding = const EdgeInsets.symmetric(horizontal: 16.0, vertical: 10.0),
  this.width,
});