https://kotlinlang.org logo
Title
n

nuhkoca

04/01/2023, 1:47 PM
Hello, In the latest version of Compose, I am seeing that a lot of internal things have changed for the
ModalBottomSheetState
. I can no longer access to
progress
,
fraction
,
overflow
and
isAnimationRunning
through the state. Is there a migration guide for this?
j

jossiwolf

04/03/2023, 6:29 AM
Progress will be re-exposed. Overflow and isAnimationRunning have been removed without replacement. If you want to customize these things, we recommend building your own component based on the Swipeable APIs :) these will be made public soon, keep an eye out on the release notes
What's your use case for the progress API?
n

nuhkoca

04/04/2023, 12:27 PM
I see, thanks for the reply. We used to dim out the screen based on the
progress
of BottomSheet expansion. Is there a new way for this?
j

jossiwolf

04/04/2023, 4:35 PM
Our UX recommendation is to preview the target state. Once a (positional) threshold is crossed, the
targetValue
of a Swipeable component changes, meaning this will be the value the state settles at when the fling happens. As such, we recommend displaying the scrim based on the
targetValue
as it clearly indicates what state the component will move to.