showToast method

void showToast({
  1. String id = 'success',
  2. String? title,
  3. String? description,
  4. Duration? duration,
})

Show a toast notification. Use id to specify the toast style (e.g., "success", "warning", "info", "danger"). You can also use custom style IDs registered via Nylo.addToastNotifications.

Implementation

void showToast({
  String id = 'success',
  String? title,
  String? description,
  Duration? duration,
}) {
  if (!mounted) return;
  showToastNotification(
    context,
    id: id,
    title: title,
    description: description,
    duration: duration,
  );
}