判断设备是否连接网络
Future<bool> isNetworkAvailable() async { var connectivityResult = await Connectivity().checkConnectivity(); return !connectivityResult.contains(ConnectivityResult.none); }