LocationTracker class

A wrapper around Geolocator that provides continuous GPS tracking streams for use with PowerMapNavigator.

Constructors

LocationTracker()

Properties

currentLocation ValueNotifier<Position?>
Notifier that emits the latest location. Emits null when tracking is stopped or no location is found.
final
hashCode int
The hash code for this object.
no setterinherited
isTracking bool
Whether location tracking stream is currently active.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes the tracker. Call when the map or navigator is destroyed.
forceRestart() Future<void>
Force-restarts the GPS stream. Call after app resume — iOS kills the underlying CLLocationManager when backgrounded, leaving the old subscription as a dead shell. Safe to call on Android (harmless restart).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestPermissions() Future<bool>
Requests permissions and ensures location services are enabled.
startTracking() Future<void>
Starts the continuous location tracking stream if not already active.
stopTracking() → void
Stops tracking and cancels the stream.
toString() String
A string representation of this object.
inherited

Operators

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