checkConnectivity method

  1. @override
Future<ParseConnectivityResult> checkConnectivity()
override

Implementation

@override
Future<sdk.ParseConnectivityResult> checkConnectivity() async {
  switch (await Connectivity().checkConnectivity()) {
    case ConnectivityResult.wifi:
      return sdk.ParseConnectivityResult.wifi;
    case ConnectivityResult.mobile:
      return sdk.ParseConnectivityResult.mobile;
    case ConnectivityResult.none:
      return sdk.ParseConnectivityResult.none;
    default:
      return sdk.ParseConnectivityResult.wifi;
  }
}