rememberUseCaseState

fun rememberUseCaseState(visible: Boolean = false, embedded: Boolean = true, onCloseRequest: UseCaseState.() -> Unit? = null, onFinishedRequest: UseCaseState.() -> Unit? = null, onDismissRequest: UseCaseState.() -> Unit? = null): UseCaseState

Creates and remembers a UseCaseState.

Parameters

visible

The initial visibility.

embedded

if the use-case is embedded in a container (dialog, bottomSheet, popup, ...)

onCloseRequest

The listener that is invoked when the dialog was closed through any cause.

onFinishedRequest

The listener that is invoked when the dialog's use-case was finished by the user accordingly (negative, positive, selection).

onDismissRequest

The listener that is invoked when the dialog was dismissed.