showToast static method

void showToast(
  1. String? txt
)

Implementation

static void showToast(String? txt) {
  if(txt.isNullOrEmpty()){
    txt = "信息异常";
  }
  Fluttertoast.showToast(
      msg: txt ?? "",
      toastLength: Toast.LENGTH_SHORT,
      gravity: ToastGravity.BOTTOM,
      // timeInSecForIos: 1,
      backgroundColor: Colors.grey,
      textColor: Colors.white,
      fontSize: 16.0);
}