DeviceGeolocationPlatform class abstract
Interface that all platform implementations of device_geolocation must
implement.
Platform implementations should extend this class — not implement it —
so that future additions do not break them.
- Inheritance
-
- Object
- PlatformInterface
- DeviceGeolocationPlatform
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
settingsOpenedStream
→ Stream<
bool> -
Stream that emits
truewhen a system settings panel is opened by this plugin andfalsewhen the app returns to the foreground.no setter
Methods
-
bearingBetween(
double startLatitude, double startLongitude, double endLatitude, double endLongitude) → double - Initial bearing (forward azimuth) from start to end coordinates, expressed in degrees.
-
checkPermission(
) → Future< DeviceLocationPermission> -
distanceBetween(
double startLatitude, double startLongitude, double endLatitude, double endLongitude, {GeospatialAlgorithm algorithm = GeospatialAlgorithm.vincenty}) → double - Great-circle distance between two coordinates in meters.
-
getCurrentPosition(
{DeviceLocationSettings? deviceLocationSettings}) → Future< DevicePosition> -
getLocationAccuracy(
) → Future< DeviceLocationAccuracyStatus> -
getPermissionStream(
{Duration pollingInterval = const Duration(seconds: 1)}) → Stream< DeviceLocationPermission> -
getPositionStream(
{DeviceLocationSettings? deviceLocationSettings}) → Stream< DevicePosition> -
getServiceStatusStream(
) → Stream< DeviceLocationServiceStatus> -
isLocationServiceEnabled(
) → Future< bool> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openAppSettings(
{DeviceGeolocationSettingsCallback? callback}) → Future< bool> -
openLocationSettings(
{DeviceGeolocationSettingsCallback? callback}) → Future< bool> -
requestPermission(
{bool requestBackground = false}) → Future< DeviceLocationPermission> -
requestTemporaryFullAccuracy(
{required String purposeKey}) → Future< DeviceLocationAccuracyStatus> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ DeviceGeolocationPlatform
-
Currently registered platform implementation.
getter/setter pair