ToastMeta.success constructor

ToastMeta.success({
  1. Color? backgroundColor,
  2. String? description,
  3. String? title,
  4. Duration? duration,
  5. Function? action,
  6. Map<String, dynamic>? metaData,
  7. dynamic icon = const Icon(Icons.check, color: Colors.green, size: 20),
})

Pre-defined style for the ToastNotificationStyleType.SUCCESS toast alert.

Implementation

ToastMeta.success(
    {Color? backgroundColor,
    String? description,
    String? title,
    Duration? duration,
    Function? action,
    Map<String, dynamic>? metaData,
    icon = const Icon(Icons.check, color: Colors.green, size: 20)})
    : icon = icon,
      title = title ?? "Success",
      description = description ?? "",
      color = backgroundColor ?? Colors.green.shade50,
      duration = duration ?? const Duration(seconds: 5),
      action = action,
      style = 'success',
      metaData = metaData,
      super();