LocationManager class

Provide access to location data while the app is in the background.

Use as a singleton:

LocationManager()...

Constructors

LocationManager()
Get the singleton LocationManager instance
factory

Properties

accuracy LocationAccuracy
Set the update accuracy. See LocationAccuracy for options.
no getter
distanceFilter double
Set the update distance, i.e. the distance the user needs to move before an update is fired.
no getter
hashCode int
The hash code for this object.
no setterinherited
interval int
Set the update interval in seconds. Android only.
no getter
isRunning Future<bool>
Get the status of the location manager. Will return true if a location service is currently running.
no setter
locationStream Stream<LocationDto>
A stream of location data updates. Call start before using this stream.
no setter
notificationBigMsg ← dynamic
Set the long message of the notification for the background service. Android only.
no getter
notificationMsg ← dynamic
Set the message of the notification for the background service. Android only.
no getter
notificationTitle ← dynamic
Set the title of the notification for the background service. Android only.
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getCurrentLocation() Future<LocationDto>
Get the current location.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() Future<bool>
Start the location manager. Will have no effect if it is already running.
stop() Future<void>
Stop the location manager.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited