collectAsStateWithLifecycle

fun <Error class: unknown class>.collectAsStateWithLifecycle(): State<<Error class: unknown class>>

Extension function to collect GrantUiState from GrantHandler in a Composable.

This is a convenience helper that simplifies the common pattern of observing the handler's state in Compose UI.

Usage:

@Composable
fun MyScreen(handler: GrantHandler) {
val state by handler.collectAsStateWithLifecycle()
// Now use state.showRationale, state.rationaleMessage, etc.
}

Instead of manually calling:

val state by handler.state.collectAsStateWithLifecycle()

Return

State holder containing the current GrantUiState


fun <Error class: unknown class>.collectAsStateWithLifecycle(): State<<Error class: unknown class>>

Extension function to collect GrantGroupUiState from GrantGroupHandler in a Composable.

Usage:

@Composable
fun MyScreen(handler: GrantGroupHandler) {
val state by handler.collectAsStateWithLifecycle()
// Now use state.isVisible, state.grantedGrants, etc.
}

Return

State holder containing the current GrantGroupUiState


fun <Error class: unknown class>.collectAsStateWithLifecycle(): State<<Error class: unknown class>>

Extension function to collect state from GrantAndServiceHandler in a Composable.