LocationAccuracy class

Desired accuracy for a location request. Accuracy works differently on Android and iOS, but this class tries to find common ground.

Lower accuracy location request use less battery, so be sure to always choose accuracy that make sense for your usage.

See also:

Constructors

LocationAccuracy({@required LocationPriorityAndroid android, @required LocationAccuracyIOS ios })
In case the common ground constants are not satisfactory, you can build a custom LocationAccuracy using specific platform values.
const

Properties

android LocationPriorityAndroid
final
ios LocationAccuracyIOS
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

best → const LocationAccuracy
Highest accuracy that will generate the most precise device location, but also the most battery consuming.
const LocationAccuracy(android: LocationPriorityAndroid.high, ios: LocationAccuracyIOS.bestForNavigation)
block → const LocationAccuracy
Balanced accuracy that can locate the device accurately to within hundred meters.
const LocationAccuracy(android: LocationPriorityAndroid.balanced, ios: LocationAccuracyIOS.hundredMeters)
city → const LocationAccuracy
Low accuracy that can locate the device accurately to within several kilometers.
const LocationAccuracy(android: LocationPriorityAndroid.low, ios: LocationAccuracyIOS.threeKilometers)