Heya all I can see that in the latest Compose Mate...
# compose
a
Heya all I can see that in the latest Compose Material alpha build
bottomSheetState.offset
was removed from the
ModalBottomSheetState
. I've used it to control alpha and visibility of a Search bar on the top. So, as user expanded ModalBottomSheet that view would appear. Now I can only use
currentValue
and
targetValue
. Any idea how I could get that functionality back? I don't wanna use
BottomSheetState
as it has only
Collapsed
and
Expanded
states.
plus1 6
c
cc: @jossiwolf
j
We made some changes recently that introduce some nuance to consuming the offset and are currently looking into more advanced use cases like a sticky footer. A word on the UX of the pattern: we have UX guidelines in Material that recommend "previewing" the target state, the target state being the closest state/the state the component would move to if the user stopped the interaction. You can see that with modal bottom sheets, the scrim doesn't gradually fade in but rather animates in once a threshold has been crossed. The same would go for this use case. We'd recommend controlling the visibility of the component only based on the target state.
a
Ok that makes sense, thanks for the reply. I ended up playing around with
targetValue
and
currentValue
in order to achieve similar functionality.