INNER CODE UNIT · Dart

onMotionChange

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

  static Subscription onMotionChange(Function(Location) callback) {
    if (_eventsMotionChange == null) {
      _eventsMotionChange = _eventChannelMotionChange
          .receiveBroadcastStream()
          .map((dynamic event) => Location(event));
    }
    _registerSubscription(_eventsMotionChange!.listen(callback), callback);
    return Subscription._(() async {
      removeListener(callback);
    });
  }

  /// Subscribe to locationfilter events.
  ///
  /// Your `callback` will be executed each time the tracking location-filter __rejects__ a location sample (eg: horizontal accuracy worse than [LocationFilterEvent.trackingAccuracyThreshold]).  Rejected locations are __not__ delivered to [onLocation], so this event is the only way to observe and adapt to them.
  ///
  /// ## Example
  ///

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…