location_background_plugin 0.1.0+3 copy "location_background_plugin: ^0.1.0+3" to clipboard
location_background_plugin: ^0.1.0+3 copied to clipboard

A new flutter plugin project.

Flutter Background Execution Sample - LocationBackgroundPlugin #

An example Flutter plugin that showcases background execution using iOS location services.

This plugin is not being actively maintained and is not for production use. An archive of previous versions can be found in the Flutter plugins repository.

Getting Started #

NOTE: This plugin does not currently have an Android implementation.

To import, add the following to your Dart file:

import 'package:location_background/location_background.dart';

Example usage:

import 'package:location_background/location_background.dart';

final locationManager = LocationBackgroundPlugin();

void locationUpdateCallback(Location location) {
  print('Location Update: $location');
}

Future<void> startMonitoringLocationChanges() =>
    locationManager.monitorSignificantLocationChanges(locationUpdateCallback);
    
Future<void> stopMonitoringLocationChanges() =>
    locationManager.cancelLocationUpdates();

WARNING: do not maintain volatile state or perform long running operations in the location update callback. There is no guarantee from the system for how long a process can perform background processing after a location update, and the Dart isolate may shutdown during execution at the request of the system.

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Homepage
Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on location_background_plugin