https://kotlinlang.org logo
Title
y

yogaboy

04/09/2023, 8:47 PM
Hi, I am using material3 ModalBottomSheet. If I launching it I use
AnimatedVisibility(visible = sheetState.isVisible) {
    ModalBottomSheet(
But it is not animated. It just flash. If I set sheetState.isVisible = false or pull down it is nicely animated. What I am doing wrong? What I am missing? Thanks folks! 🙏🏻 :compose:
c

Colton Idle

04/09/2023, 9:57 PM
t

Travis Griggs

04/10/2023, 5:26 AM
I use the following and get animated opens:
ModalBottomSheet(
   onDismissRequest = closeWith {}, sheetState = SheetState(skipPartiallyExpanded = true)
)
y

yogaboy

04/10/2023, 12:17 PM
The example seems to be ok. I have the same implementation. The problem is somewhere else 😄 Thanks guys! 😄 🙏🏻
how does it happen 😄 I had almost the same implementation … I use state for hide and show sheetState.show() not
scope.launch {
    openBottomSheet = !openBottomSheet
}
😄 pretty stupid my fault. Once again thanks @Travis Griggs and @Colton Idle 🙏🏻