LocationService class
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
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
Methods
-
addLocationUpdate(
Position position) → void - Adds a location update from an external source
-
calculateDistance(
Position start, Position end) → double - Calculates the distance between two geographical points
-
dispose(
) → Future< void> - Disposes of all location service resources
-
getCurrentLocation(
) → Future< Position?> - //////////// //////////// Retrieves the current location with comprehensive permission handling
-
getCurrentSpeed(
Position position) → double - Estimates current speed from a position
-
getLocationStream(
) → Stream< Position> - Provides a stream of location updates using foreground service when navigation is active
-
init(
dynamic showErrorCallback(String)) → Future< void> - //////////// //////////// Initialize the location service with a callback for showing errors
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
- Sets the navigation active state to determine service behavior
-
stopLocationUpdates(
) → Future< void> - //////////// //////////// Stops location updates and releases resources with enhanced error handling
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited