判断网络是否连接
static Future<bool> isConnected() async { var connectResult = await (Connectivity().checkConnectivity()); return connectResult.isNotEmpty; }