I want to show
ModalBottomSheetLayout
on user action. I have a component in app, that called
ActionSheet
and wrap
ModalBottomSheetLayout
. It pass
ModalBottomSheetState
from outside by composable function params, other params for
ModalBottomSheetLayout
assigns under the hood [thread].
Also there is
MutableStateFlow
[somewhere in app, doesnt matter], that typed with
ActionSheetCommand
type. When user do the action then concrete implementation of
ActionSheetCommand
emits through the `MutableStateFlow`[thread].
ActionSheetWrapper
[thread] - another wrapper around
ActionSheet
, collect these emits and show `ActionSheet`(
ModalBottomSheetLayout
) using state, that initialized in
ActionSheetWrapper
.
Somewhy
ModalBottomSheetLayout
opens only on first emit. All next emits even not printed inside
emit
function of collector. Why can it be? Looks like
emit
function in collector somehow deadlock queue and next emits just not pass through
MutableStateFlow
.