getLocation method
Gets the current location of the user.
Throws an error if the app has no permission to access location.
Returns a LocationData
object.
Implementation
@override
Future<LocationData> getLocation() async {
final js.Geoposition result = await _geolocation.getCurrentPosition(
enableHighAccuracy: _accuracy!.index >= LocationAccuracy.high.index,
);
return _toLocationData(result);
}