checkConnectivity method
Implementation
Future<String> checkConnectivity() async {
var result = "";
var connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.mobile) {
result = 'Mobile';
} else if (connectivityResult == ConnectivityResult.wifi) {
result = 'Wifi';
}
return result;
}