show method

  1. @override
void show(
  1. String message,
  2. {ToastLength? toastLength,
  3. Duration? toastDuration,
  4. int? timeInSec,
  5. ToastGravity? gravity,
  6. double? fontSize,
  7. Color? backgroundColor,
  8. Color? textColor}
)

Implementation

@override
show(String message, {
  ToastLength? toastLength,
  Duration? toastDuration,
  int? timeInSec,
  ToastGravity? gravity,
  double? fontSize,
  Color? backgroundColor,
  Color? textColor
}) {
  if (message.isEmpty) {
    return;
  }
  toast.Fluttertoast.showToast(
    msg: message,
    toastLength: toastOf(toastLength ?? ToastConfig.defaultToastLength),
    timeInSecForIosWeb: timeInSec ?? ToastConfig.defaultTimeInSec,
    gravity: toastGravityOf(gravity ?? ToastConfig.defaultGravity),
    fontSize: fontSize ?? ToastConfig.defaultFontSize,
    backgroundColor: backgroundColor ?? ToastConfig.defaultBackgroundColor,
    textColor: textColor ?? ToastConfig.defaultTextColor,
  );
}