Skip to main content

GeolocatorPermissionStatus

Represent the possible location permissions.

Inherits: enum.Enum

Properties

  • ALWAYS - Permission to access the device's location is allowed even when the app is running in the background.
  • DENIED - Permission to access the device's location is denied.
  • DENIED_FOREVER - Permission to access the device's location is permanently denied.
  • UNABLE_TO_DETERMINE - Permission status cannot be determined.
  • WHILE_IN_USE - Permission to access the device's location is allowed only while the app is in use.

Properties​

ALWAYSclass-attributeinstance-attribute​

Permission to access the device's location is allowed even when the app is running in the background.

DENIEDclass-attributeinstance-attribute​

Permission to access the device's location is denied.

The app should try to request permission using the Geolocator.request_permission method.

DENIED_FOREVERclass-attributeinstance-attribute​

Permission to access the device's location is permanently denied.

When requesting permissions, the permission dialog will not be shown until the user updates the permission in the app settings.

UNABLE_TO_DETERMINEclass-attributeinstance-attribute​

Permission status cannot be determined.

This status is only returned by the Geolocator.request_permission method on the web platform for browsers that did not implement the Permissions API. See: https://developer.mozilla.org/en-US/docs/Web/API/Permissions_API

WHILE_IN_USEclass-attributeinstance-attribute​

Permission to access the device's location is allowed only while the app is in use.