ModToast constructor

const ModToast({
  1. Key? key,
  2. String? title,
  3. required String message,
  4. IconData? icon,
  5. Color? backgroundColor,
  6. Color? textColor,
  7. Color? iconColor,
  8. Duration duration = const Duration(seconds: 4),
  9. ToastPosition position = ToastPosition.topCenter,
  10. bool showCloseButton = true,
  11. VoidCallback? onClose,
  12. EdgeInsetsGeometry margin = const EdgeInsets.all(16),
  13. double borderRadius = 8.0,
  14. double? width,
  15. double? height,
  16. ToastType type = ToastType.custom,
  17. BoxShadow? shadow,
  18. double? maxWidth,
})

Implementation

const ModToast({
  super.key,
  this.title,
  required this.message,
  this.icon,
  this.backgroundColor,
  this.textColor,
  this.iconColor,
  this.duration = const Duration(seconds: 4),
  this.position = ToastPosition.topCenter,
  this.showCloseButton = true,
  this.onClose,
  this.margin = const EdgeInsets.all(16),
  this.borderRadius = 8.0,
  this.width,
  this.height,
  this.type = ToastType.custom,
  this.shadow,
  this.maxWidth,
});