Jetpack Compose Component

PermissionRequiredHeaderDialog

A dialog that requests the user for a runtime permission.

@Composable
fun UnlockFullCode() {
    val handler = LocalUriHandler.current
    Card(
        Modifier
            .fillMaxWidth()
            .padding(16.dp)
    ) {
        Column(
            Modifier.padding(12.dp)
                .fillMaxWidth(),
            verticalArrangement = Arrangement.spacedBy(14.dp),
        ) {
            Text("Nice try", style = MaterialTheme.typography.bodyLarge)
            Button(
                modifier = Modifier.align(Alignment.End),
                onClick = { handler.openUri("https://www.composables.com/purchase/ui") }) {
                Text("Get the full code")
            }
        }
    }
}