PassphrasePromptBottomSheet

fun PassphrasePromptBottomSheet(sheetState: SheetState, title: String, subtitle: String, passphraseConstraints: PassphraseConstraints, showKeyboard: StateFlow<Boolean>, onPassphraseEntered: suspend (passphrase: String) -> String?, onDismissed: () -> Unit)

A ModalBottomSheet used for obtaining a passphrase.

Parameters

sheetState

a SheetState for state.

title

the title in the sheet.

subtitle

the subtitle to display in the sheet.

passphraseConstraints

a PassphraseConstraints describing the passphrase to be collected.

showKeyboard

a StateFlow that should be set to true once the bottom sheet is fully shown.

onPassphraseEntered

called when the passphrase has been collected. Return null to indicate success otherwise a message to display in the prompt conveying the user entered the wrong passphrase.

onDismissed

called if the user dismisses the sheet.