INNER CODE UNIT · Dart

onProviderChange

transistorsoft/flutter_background_geolocation · lib/models/background_geolocation.dart:1591

  static Subscription onProviderChange(Function(ProviderChangeEvent) callback) {
    if (_eventsProviderChange == null) {
      _eventsProviderChange = _eventChannelProviderChange
          .receiveBroadcastStream()
          .map((dynamic event) {
        return ProviderChangeEvent(event);
      });
    }
    _registerSubscription(_eventsProviderChange!.listen(callback), callback);
    return Subscription._(() async {
      removeListener(callback);
    });
  }

  /// Subscribe to changes in network connectivity.
  ///
  /// Fired when the state of the device's network-connectivity changes (enabled -> disabled and vice-versa).  By default, the plugin will automatically fire a `connectivitychange` event with the current state network-connectivity whenever the [start] method is executed.
  ///

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…