fluttertoast官方package
如何使用:
添加依赖库:
fluttertoast: ^2.1.1
导入:
import 'package:fluttertoast/fluttertoast.dart';
示例
_toast(){
Fluttertoast.showToast(
msg: "网络连接错误",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM,
timeInSecForIos: 1,
backgroundColor: Colors.grey,
textColor: Color(0xFFEEEEEE));
}