error static method

Widget error(
  1. BuildContext context, {
  2. int? duration,
  3. required double height,
  4. required double width,
  5. double? borderRadius,
  6. Color? shadowColor,
  7. Color? toastColor,
  8. Widget? indicatorWidget,
  9. required Text label,
  10. Alignment? alignment,
})

Invokes error flutter hot toast

Implementation

static Widget error(
  BuildContext context, {
  /// The duration in milliseconds
  int? duration,

  /// The height of flutter hot toast
  required double height,

  /// The width of flutter hot toast
  required double width,

  /// The border radius of flutter hot toast
  double? borderRadius,

  /// The shadow color of flutter hot toast
  Color? shadowColor,

  /// The actual toast color of flutter hot toast
  Color? toastColor,

  /// A nullable indicator widget used
  Widget? indicatorWidget,

  /// The label of the flutter hot toast
  required Text label,

  /// The alignmnet of the flutter hot toast
  Alignment? alignment,
}) {
  context.loaderOverlay.hide();
  Future.delayed(Duration(milliseconds: duration ?? 2000), () {
    context.loaderOverlay.hide();
  });
  return HotToast(
    alignment: alignment,
    type: FlutterHotToastType.error,
    toastColor: toastColor,
    height: height,
    width: width,
    borderRadius: borderRadius,
    shadowColor: shadowColor,
    indicatorWidget: indicatorWidget,
    label: label,
  );
}