toast static method

dynamic toast({
  1. required String msg,
  2. ToastPosition? position,
  3. ToastTime? time,
  4. Color? backgroundColor,
  5. Color? textColor,
  6. double? fontSize,
})

Implementation

static toast({
  required String msg,
  ToastPosition? position,
  ToastTime? time,
  Color? backgroundColor,
  Color? textColor,
  double? fontSize,
}) {
  Fluttertoast.showToast(
    msg: msg,
    toastLength: timeValue[time ?? ToastTime.LENGTH_SHORT],
    gravity: positionValue[position ?? ToastPosition.CENTER],
    timeInSecForIosWeb: 1,
    backgroundColor: backgroundColor ?? Colors.black.withOpacity(0.8),
    textColor: textColor ?? Colors.white,
    fontSize: fontSize ?? 14.0,
  );
}