connectivityStream property

  1. @override
Stream<ParseConnectivityResult> get connectivityStream
override

Implementation

@override
Stream<sdk.ParseConnectivityResult> get connectivityStream {
  return Connectivity().onConnectivityChanged.map((ConnectivityResult event) {
    switch (event) {
      case ConnectivityResult.wifi:
        return sdk.ParseConnectivityResult.wifi;
      case ConnectivityResult.mobile:
        return sdk.ParseConnectivityResult.mobile;
      default:
        return sdk.ParseConnectivityResult.none;
    }
  });
}