rememberDialogState

@Composable
fun rememberDialogState(position: WindowPosition = WindowPosition.PlatformDefault, size: Dimension? = null): DialogState

Creates a DialogState that is remembered across compositions.

Changes to the provided initial values after the state has been created do not recreate or mutate it; hoist the state and update its properties directly to drive the dialog afterwards.

Parameters

position

the initial value for DialogState.position

size

the initial value for DialogState.size; a null size sizes the dialog to its content, while a non-null size is applied verbatim