toastMsg function

dynamic toastMsg(
  1. String msg, [
  2. String? type = "danger"
])

Implementation

toastMsg(String msg, [String? type = "danger"]) {
  Fluttertoast.showToast(
      msg: msg,
      backgroundColor: type == "danger" ? Colors.red : Colors.green,
      gravity: ToastGravity.TOP,
      toastLength: Toast.LENGTH_LONG);
}