currentPosition method

Future<GeoPosition> currentPosition({
  1. bool enableHighAccuracy = false,
  2. Duration? timeout,
  3. Duration? maximumAge,
})

Requests the current location once.

In browser builds this prompts the user when permission is needed. In this server-safe stub it completes with an unsupported GeoLocationError.

Implementation

Future<GeoPosition> currentPosition({
  bool enableHighAccuracy = false,
  Duration? timeout,
  Duration? maximumAge,
}) {
  return Future.error(_unsupportedError);
}