location_background_plugin 0.1.0+3 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.