showToast function

void showToast(
  1. String msg, {
  2. Toast toastLength = Toast.LENGTH_SHORT,
  3. ToastGravity gravity = ToastGravity.BOTTOM,
  4. int timeInSecForIosWeb = 1,
  5. Color backgroundColor = Colors.black,
  6. Color textColor = Colors.white,
  7. double fontSize = 16.0,
})

Implementation

void showToast(
  String msg, {
  Toast toastLength = Toast.LENGTH_SHORT,
  ToastGravity gravity = ToastGravity.BOTTOM,
  int timeInSecForIosWeb = 1,
  Color backgroundColor = Colors.black,
  Color textColor = Colors.white,
  double fontSize = 16.0,
}) {
  Fluttertoast.cancel();
  Fluttertoast.showToast(
    msg: msg,
    toastLength: toastLength,
    gravity: gravity,
    timeInSecForIosWeb: timeInSecForIosWeb,
    backgroundColor: backgroundColor,
    textColor: textColor,
    fontSize: fontSize,
  );
}