requestLocationPermission static method

Future<bool> requestLocationPermission()

Requests location permission from the platform (web-only helper).

On web platforms this method asks the browser for location permission and resolves to true when the permission is granted. On native platforms (Android/iOS) this method is not implemented and platform specific permission flows (for example using permission_handler) must be used instead.

Returns

  • A Future<bool> that completes to true when permission is granted on web, otherwise false.

Throws

Implementation

static Future<bool> requestLocationPermission() {
  return GemKitPlatform.instance.askForLocationPermission();
}