我正在使用Fluttertoast.showToast
快速显示警告:
Fluttertoast.showToast(msg: 'text',
toastLength: Toast.LENGTH_LONG,
gravity: ToastGravity.CENTER,
timeInSecForIos: 3,
backgroundColor: Colors.orange,
textColor: Colors.black,
);
文本不会出现在框内居中。 有小费吗? enter image description here
答案 0 :(得分:0)
您可以尝试使用以下参数:webPosition: "center"
Fluttertoast.showToast(msg: 'text',
toastLength: Toast.LENGTH_LONG,
gravity: ToastGravity.CENTER,
timeInSecForIos: 3,
backgroundColor: Colors.orange,
textColor: Colors.black,
webPosition: "center"
);