remember Jenga Sheet State
fun rememberJengaSheetState(skipPartiallyExpanded: Boolean = true, confirmDismiss: () -> Boolean? = null): JengaSheetState(source)
Remembers a JengaSheetState for an externally-controlled JengaBottomSheet.
Parameters
skip Partially Expanded
when true (the default), the sheet has no half-expanded detent; it is either fully shown or hidden.
confirm Dismiss
called before the sheet closes, whether from a drag, a scrim tap, Back or JengaSheetState.hide; null (the default) always allows it. Return false to keep the sheet open, for example to ask the user first; once they agree, make it return true and call JengaSheetState.hide. It can run more than once for one close, so it should only read or set state. When set, Back skips the system's shrink animation, so a refused close leaves the sheet as it was.