location_background_plugin 0.1.0+3

  • Readme
  • Changelog
  • Example
  • Installing
  • 68

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.1.0+3 #

  • Update README.md indicating package support status.

0.1.0+2 #

  • Fix Dart deprecation warnings.

0.1.0+1 #

  • Log a more detailed warning at build time about the previous AndroidX migration.

0.1.0 #

  • Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.

0.0.2 #

  • Added missing flutter_test package dependency.
  • Added missing flutter version requirements.

0.0.1 #

  • Initial release.

example/README.md

Flutter Background Plugin Example for iOS. #

Demonstrates how to use the LocationBackgroundPlugin, a sample plugin showcasing Flutter background execution on iOS.

Getting Started #

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

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  location_background_plugin: ^0.1.0+3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:location_background_plugin/location_background_plugin.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
53
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
68
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://github.com/flutter/plugins/tree/master/packages/location_background was unreachable.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test