showToast static method

Future<void> showToast({
  1. required String message,
  2. bool isShort = true,
})

Shows a toast message at the bottom of the screen.

Implementation

static Future<void> showToast({
  required String message,
  bool isShort = true,
}) async {
  await Fluttertoast.showToast(
    msg: message,
    toastLength: isShort ? Toast.LENGTH_SHORT : Toast.LENGTH_LONG,
    gravity: ToastGravity.BOTTOM,
    timeInSecForIosWeb: 5,
    backgroundColor: ConfigConstants.white,
    textColor: ConfigConstants.black,
    fontSize: ConfigConstants.fontToastMessage,
  );
}