Geolocation class

Provides an access to geolocation features of the underlying platform (Android or iOS).

Constructors

Geolocation()

Properties

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

Static Properties

loggingEnabled bool
Activate verbose logging for debugging purposes.
read / write

Static Methods

currentLocation({LocationAccuracy accuracy, bool inBackground: false, LocationPermission permission: const LocationPermission() }) Stream<LocationResult>
Requests the current "one-shot" Location, using Android and iOS best practice mechanics. Automatically request location permission beforehand if not granted. [...]
isLocationOperational({LocationPermission permission: const LocationPermission() }) Future<GeolocationResult>
Checks if location service is currently operational. It includes if location permission is granted. [...]
lastKnownLocation({LocationPermission permission: const LocationPermission() }) Future<LocationResult>
Retrieves the most recent Location currently available. Automatically request location permission beforehand if not granted. [...]
locationUpdates({LocationAccuracy accuracy, double displacementFilter: 0.0, bool inBackground: false, LocationPermission permission: const LocationPermission() }) Stream<LocationResult>
Requests continuous Location updates. Automatically request location permission beforehand if not granted. [...]
requestLocationPermission([LocationPermission permission = const LocationPermission() ]) Future<GeolocationResult>
Requests the location permission, if needed. [...]
singleLocationUpdate({LocationAccuracy accuracy, bool inBackground: false, LocationPermission permission: const LocationPermission() }) Stream<LocationResult>
Requests a single Location update. Automatically request location permission beforehand if not granted. [...]