RequestPermission

Creates a ComposableNavSpec.Launcher to request a permission.

Parameters

ViewModel

the type of BaseLifecycleViewModel the result should be called on.

permission

Key of the permission to be requested. E.g. android.Manifest.permission.ACCESS_COARSE_LOCATION.

onResult

Callback method that returns true if the permission was granted, false otherwise.