errorToast function

ScaffoldFeatureController<Widget, dynamic> errorToast({
  1. required BuildContext context,
  2. String? title,
  3. required String message,
  4. Icon? icon,
  5. Duration duration = const Duration(seconds: 8),
  6. dynamic onTap(
    1. Function
    )?,
  7. bool? error,
  8. bool hideCloseButton = false,
  9. Color? backgroundColor,
  10. Color? foregroundColor,
  11. double runSpacing = 12,
})

Implementation

ScaffoldFeatureController errorToast({
  required BuildContext context,
  String? title,
  required String message,
  Icon? icon,
  Duration duration = const Duration(seconds: 8),
  Function(Function)? onTap,
  bool? error,
  bool hideCloseButton = false,
  Color? backgroundColor,
  Color? foregroundColor,
  double runSpacing = 12,
}) {
  return toast(
    context: context,
    title: title,
    message: message,
    icon: icon,
    duration: duration,
    onTap: onTap,
    error: true,
    hideCloseButton: hideCloseButton,
    backgroundColor: backgroundColor,
    foregroundColor: foregroundColor,
    runSpacing: runSpacing,
  );
}