LocationPlatform class abstract
The only thing that touches the OS. GeolocatorLocationPlatform in
production, InMemoryLocationPlatform in tests.
Implementations return failures instead of throwing where they can; the caller still guards every call and bounds it with a timeout.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSupported → bool
-
falseon web and desktop, where every call returnsnotApplicable.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
attach(
int generation, Map< String, Object?> settings) → Future<void> -
Called once per Dart isolate before anything else. A new
generationtells the native side a hot restart happened: drop every listener and pending callback from the previous isolate. -
checkConfiguration(
) → Future< ConfigurationCheck> -
checkPermission(
) → Future< LocationAccess> -
clearStored(
) → Future< void> -
configure(
Map< String, Object?> settings) → Future<void> - Pushes changed settings (store throttling, global filters).
-
currentPosition(
{required LocationAccuracy accuracy, required Duration timeout, Duration? maxAge}) → Future< PlatformFix> -
One fix. Reuses a native fix younger than
maxAge. Answers withintimeoutwith a fix or atimeout/noFixfailure. -
diagnostics(
) → Future< Map< String, Object?> > -
Raw facts for
diagnose(). -
dispose(
) → Future< void> - Stops native work started by this isolate.
-
isOnline(
) → Future< bool?> -
true/falsewhen the platform can tell (validated network),nullwhen it can't (Android withoutACCESS_NETWORK_STATE). -
isServiceEnabled(
) → Future< bool> -
lastKnown(
) → Future< PlatformLastKnown> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openAppSettings(
) → Future< bool> -
openLocationSettings(
) → Future< bool> -
positionStream(
StreamRequest request) → Stream< PositionEvent> -
Native fixes for
request. Listening starts the platform request; cancelling stops it. -
requestPrecise(
{String? purposeKey}) → Future< LocationAccess> -
Asks for precise location: Android re-request, iOS temporary full
accuracy with
purposeKey. Returns the access afterwards. -
resolvePlayServices(
) → Future< bool> -
Android: shows Google's "update Google Play services" dialog. Returns
whether Play services is usable afterwards.
falseelsewhere. -
resolveServices(
LocationAccuracy accuracy) → Future< ServicesResolution> -
statusStream(
) → Stream< LocationStatus> -
storeAddress(
Position position, Map< String, Object?> addressMap) → Future<void> -
Attaches
addressMapto the stored last known position if it is stillposition. -
toString(
) → String -
A string representation of this object.
inherited
-
updateStreamRequest(
StreamRequest request) → Future< void> - Changes the running stream's request without re-subscribing.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited