SmartToolFactory / Jetpack-Compose-Tutorials

๐Ÿš€๐Ÿงจ๐Ÿ“ Series of Tutorials to learn about Jetpack Compose with subjects Material Widgets, Layout, SubcomposeLayout, custom layouts, State, custom rememberable, recomposition, LaunchedEffect, side-effects, Gesture, Animation, Navigation, Canvas, UIs like whatsapp and others.
Apache License 2.0
3.01k stars 312 forks source link

java.lang.IllegalStateException #22

Closed showdy closed 4 months ago

showdy commented 9 months ago

java.lang.IllegalStateException: The offset was read before being initialized. Did you access the offset in a phase before layout, like effects or composition? at androidx.compose.material.AnchoredDraggableState.requireOffset(AnchoredDraggable.kt:214) at androidx.compose.material.ModalBottomSheetKt$ModalBottomSheetLayout$2$3.invoke-Bjo55l4(ModalBottomSheet.kt:622) at androidx.compose.material.ModalBottomSheetKt$ModalBottomSheetLayout$2$3.invoke(ModalBottomSheet.kt:618) at androidx.compose.foundation.layout.OffsetPxNode$measure$1.invoke(Offset.kt:247) at androidx.compose.foundation.layout.OffsetPxNode$measure$1.invoke(Offset.kt:246) at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:70) at androidx.compose.ui.node.LookaheadDelegate.placeChildren(LookaheadDelegate.kt:178) at androidx.compose.ui.node.LookaheadDelegate.placeAt-f8xVGno(LookaheadDelegate.kt:156) at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34) at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative(Placeable.kt:452) at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative$default(Placeable.kt:204) at androidx.compose.foundation.layout.FillNode$measure$1.invoke(Size.kt:704) at androidx.compose.foundation.layout.FillNode$measure$1.invoke(Size.kt:703)

shahzadansari commented 7 months ago

Fixed in #44