grantPermissionOnlyThisTime abstract method

Future<void> grantPermissionOnlyThisTime()
inherited

Grants the permission that the currently visible native permission request dialog is asking for.

Throws if no permission request dialog is present.

On iOS, this is the same as grantPermissionWhenInUse except for the location permission.

On Android versions older than 11 (R, API level 30), the concept of "one-time permissions" doesn't exist. In this case, this method is the same as grantPermissionWhenInUse.

See also:

  • grantPermissionWhenInUse and denyPermission

  • isPermissionDialogVisible, which should guard calls to this method

  • selectFineLocation and selectCoarseLocation, which works only for location permission request dialogs

Implementation

Future<void> grantPermissionOnlyThisTime();