Open jasoneggleton-benevity opened 7 months ago
I had the same problem, any idea how to solve this @skydoves ?
Checking the code seems relative easy to fix, just adding the initialValue
to the public fun rememberFlexibleBottomSheetState
would work.
Thanks for your time!
Any updates on this issue?
Initial state not working or not able to be set.
Tracing the library code, calling
rememberFlexibleBottomSheetState
calls a private functionrememberFlexibleSheetState
which has a default parameter ofinitialValue: FlexibleSheetValue = FlexibleSheetValue.Hidden
. The public method does not take that parameter, however, the initial state should evaluate to hidden regardless.In my most basic implementation, the sheet always starts off a not hidden, intermediately expanded.
It's not clear how to set the initial state, or if it's supported. Am I missing something obvious?
Wrapping the entire
FlexibleBottomSheet
in anif statement
and check some state before showing works, but then it gets awkward to have a nice animation to hide it when that state changes, it would just abruptly disappear.Expected Behaviour: