GeoLocationController class
Server-safe geolocation controller.
Browser geolocation is only available from browser builds. This stub keeps
server rendering and tests from touching navigator.
Constructors
- GeoLocationController()
-
Creates a geolocation controller.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSupported → bool
-
Whether geolocation APIs are available in this runtime.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearWatch(
GeoWatch watch) → void - Stops a live location watch.
-
currentPosition(
{bool enableHighAccuracy = false, Duration? timeout, Duration? maximumAge}) → Future< GeoPosition> - Requests the current location once.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
watchPosition(
void onChange(GeoPosition position), {void onError(GeoLocationError error)?, bool enableHighAccuracy = false, Duration? timeout, Duration? maximumAge}) → GeoWatch - Watches the user's location until clearWatch is called.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited