showToast method

dynamic showToast({
  1. ToastNotificationStyleType style = ToastNotificationStyleType.success,
  2. required String title,
  3. required String description,
  4. IconData? icon,
  5. Duration? duration,
})

Show a toast notification

Implementation

showToast(
    {ToastNotificationStyleType style = ToastNotificationStyleType.success,
    required String title,
    required String description,
    IconData? icon,
    Duration? duration}) {
  if (!mounted) return;
  showToastNotification(
    context,
    style: style,
    title: title,
    description: description,
    icon: icon,
    duration: duration,
  );
}