toast method

void toast({
  1. dynamic isToastAll = false,
})

Implementation

void toast({isToastAll = false}) {
  if (this == null || this.textEmpty()) return;

  if (!isToastAll &&
      UIData.toastExcludeList
              .xIndexNatural((e) => this?.startsWith(e) == true) >=
          0) {
    return;
  }

  if (!UIData.isMobile) {
    mxText.logMx();
    return;
  }

  if (this == "登录成功") {
    Fluttertoast.showToast(
        msg: "${this}",
        gravity: ToastGravity.CENTER,
        toastLength: Toast.LENGTH_SHORT,
        backgroundColor: Color.fromRGBO(0, 0, 0, 0.5),
        textColor: Colors.white,
        fontSize: 16.0);
    return;
  }

  Fluttertoast.showToast(
      msg: "${this}",
      gravity: ToastGravity.CENTER,
      toastLength: Toast.LENGTH_SHORT,
      backgroundColor: Color.fromRGBO(0, 0, 0, 0.5),
      textColor: Colors.white,
      fontSize: 16.0);
}