INNER CODE UNIT · Dart

onSchedule

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

  static Subscription onSchedule(Function(State) callback) {
    if (_eventsSchedule == null) {
      _eventsSchedule = _eventChannelSchedule
          .receiveBroadcastStream()
          .map((dynamic event) => State(event));
    }
    _registerSubscription(_eventsSchedule!.listen(callback), callback);
    return Subscription._(() async {
      removeListener(callback);
    });
  }

  /// Subscribe to changes in device's location-services configuration / authorization.
  ///
  /// Your `callback` fill be executed whenever a change in the state of the device's **Location Services** has been detected.  eg: "GPS ON", "Wifi only".
  ///
  ///  **NOTE:** The plugin always force-fires an `onProviderChange` event whenever the app is launched (right after the [ready] method is executed), regardless of current state, so you can learn the the current state of location-services with each boot of your application.
  ///

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…