ToastNotification constructor
const
ToastNotification({
- Key? key,
- required String message,
- Duration duration = const Duration(seconds: 3),
- Color backgroundColor = Colors.black,
- Color textColor = Colors.white,
- double borderRadius = 8.0,
- IconData? icon,
- Color? iconColor,
- VoidCallback? onDismissed,
- bool showProgress = false,
- ToastPosition position = ToastPosition.bottom,
- double elevation = 4.0,
- EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 16.0, vertical: 10.0),
- 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,
});