checkConnection static method
Implementation
static Future<String> checkConnection() async {
final connectivityResult = await Connectivity().checkConnectivity();
if (connectivityResult == ConnectivityResult.mobile) {
return "mobile";
} else if (connectivityResult == ConnectivityResult.wifi) {
return "wifi";
} else {
return "none";
}
}