INNER CODE UNIT · Dart

onLocationFilter

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

  static Subscription onLocationFilter(Function(LocationFilterEvent) callback) {
    if (_eventsLocationFilter == null) {
      _eventsLocationFilter = _eventChannelLocationFilter
          .receiveBroadcastStream()
          .map((dynamic event) {
        return LocationFilterEvent(event);
      });
    }
    _registerSubscription(_eventsLocationFilter!.listen(callback), callback);
    return Subscription._(() async {
      removeListener(callback);
    });
  }

  /// Subscribe to location events
  ///
  ///  **NOTE:** When performing a [onMotionChange] or [getCurrentPosition], the plugin requests **multiple** location *samples* in order to record the most accurate location possible.  These *samples* are **not** persisted to the database but they will be provided to your `callback`, for your convenience, since it can take some seconds for the best possible location to arrive.
  ///

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…