grantPermissionWhenInUse method
Grants the permission that the currently visible native permission request dialog is asking for.
Throws if no permission request dialog is present.
See also:
-
isPermissionDialogVisible, which should guard calls to this method
-
selectFineLocation and selectCoarseLocation, which works only for location permission request dialogs
Implementation
Future<void> grantPermissionWhenInUse() async {
await _wrapRequest(
'grantPermissionWhenInUse',
() => _client.handlePermissionDialog(
HandlePermissionRequest(code: HandlePermissionRequestCode.whileUsing),
),
);
}