Roman Polach
05/13/2021, 11:50 AMjossiwolf
05/13/2021, 9:12 PMLaunchedEffect(sheetState) {
with(sheetState) {
val isOpening = value == ModalBottomSheetValue.Hidden &&
targetValue == ModalBottomSheetValue.HalfExpanded
val isClosing = value == ModalBottomSheetValue.Expanded &&
targetValue == ModalBottomSheetValue.HalfExpanded
when {
isOpening -> animateTo(ModalBottomSheetValue.Expanded)
isClosing -> animateTo(ModalBottomSheetValue.Hidden)
}
}
}
Roman Polach
05/14/2021, 7:40 AM