TrackingManager class

Manager for handling real-time location tracking using Geolocator.

Designed for delivery apps and navigation use cases. Uses Geolocator for battery-efficient, high-accuracy GPS positioning instead of relying on heavy Dart timers.

Constructors

TrackingManager(MapLibreMapController mapController)

Properties

hashCode → int
The hash code for this object.
no setterinherited
isUserLocationVisible → ValueNotifier<bool>
Notifier for user location visibility.
final
lastPosition → Position?
no setter
mapController → MapLibreMapController
final
mode → TrackingMode
no setter
modeNotifier → ValueNotifier<TrackingMode>
Notifier for tracking mode changes.
final
positionNotifier → ValueNotifier<Position?>
Notifier for position updates.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

disableFollowMode() → Future<void>
Unlocks camera so user can drag freely again.
dispose() → void
Clean up resources.
enableFollowMode() → Future<void>
Locks camera smoothly on device location.
enableFollowModeWithCompass() → Future<void>
Locks camera and rotates map to match device heading (compass).
getCurrentLocation() → Future<LatLng?>
Returns the current device position as a one-shot request.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestPermission() → Future<bool>
Checks and requests location permission. Returns true if permission is granted.
showUserLocation(bool enabled) → Future<void>
Enables or disables the visual user location indicator (blue puck with compass).
toString() → String
A string representation of this object.
inherited

Operators

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