tlserver / flutter_map_location_marker

A flutter map plugin for displaying device current location.
https://pub.dev/packages/flutter_map_location_marker
BSD 3-Clause "New" or "Revised" License
97 stars 81 forks source link

function request : stop listen when enter background #32

Closed tsuncp closed 1 year ago

tsuncp commented 2 years ago

you could add an option to cancel the listener when enter background? just like google map, to avoid the blue notifification on the top left corner for ios platform

tsuncp commented 2 years ago
  @override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    switch (state) {
      case AppLifecycleState.resumed:
        _positionStreamSubscription = _subscriptPositionStream();
        break;
      case AppLifecycleState.paused:
        _positionStreamSubscription.cancel();
        break;
      default:
        break;
    }
  }
tlserver commented 2 years ago

Have you tried to set showBackgroundLocationIndicator to false?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 7 days with no activity.