CustomToast constructor

const CustomToast({
  1. Key? key,
  2. required String message,
  3. ToastType type = ToastType.success,
  4. ToastStyle style = ToastStyle.simple,
  5. TextStyle? textStyle,
  6. TextAlign? textAlign,
  7. VoidCallback? onClose,
})

Creates a CustomToast.

Requires a message to display. Optionally accepts type, style, textStyle, textAlign, and onClose callback.

Implementation

const CustomToast({
  super.key,
  required this.message,
  this.type = ToastType.success,
  this.style = ToastStyle.simple,
  this.textStyle,
  this.textAlign,
  this.onClose,
});