I’m trying to set the peek height of a bottom shee...
# compose
c
I’m trying to set the peek height of a bottom sheet dynamically in a
BottomSheetScaffold
. I noticed that you can set a remembered value in
Modifier.onGloballyPositioned()
to the height of a composable. Then you can set the peek height to this value. However, this doesn’t seem to correctly update on recompositions after the initial one. In fact, one needs to swipe away the activity to get it to recalculate the correct peek height. I do know that onGloballyPositioned is supposed to run after composition, but if I change the remembered mutable state used to set the peek height, shouldn’t it recompose again?
433 Views