alexzhirkevich / compose-cupertino

Compose Multiplatform UI components for iOS (Cupertino Widgets)
Apache License 2.0
1.12k stars 40 forks source link

CupertinoDatePicker crashes when used with Compose 1.7.0 #70

Closed StefanOltmann closed 18 hours ago

StefanOltmann commented 3 days ago

Using the CupertinoDatePicker on JVM Desktop with Compose 1.7.0 results in a crash.

To me it looks like that the rememberSnapFlingBehavior() now takes a parameter less than before.

                            java.lang.NoSuchMethodError: 'androidx.compose.foundation.gestures.FlingBehavior androidx.compose.foundation.gestures.snapping.LazyListSnapLayoutInfoProviderKt.rememberSnapFlingBehavior(androidx.compose.foundation.lazy.LazyListState, androidx.compose.runtime.Composer, int)'
    at io.github.alexzhirkevich.cupertino.CupertinoDatePickerKt.HorizontalMonthsList(CupertinoDatePicker.kt:812)
    at io.github.alexzhirkevich.cupertino.CupertinoDatePickerKt.access$HorizontalMonthsList(CupertinoDatePicker.kt:1)
    at io.github.alexzhirkevich.cupertino.CupertinoDatePickerKt$CupertinoDatePickerPager$2$1$5.invoke(CupertinoDatePicker.kt:609)
    at io.github.alexzhirkevich.cupertino.CupertinoDatePickerKt$CupertinoDatePickerPager$2$1$5.invoke(CupertinoDatePicker.kt:589)
    at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jb.kt:137)
    at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jb.kt:33)
    at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1$5.invoke(AnimatedContent.kt:803)
    at androidx.compose.animation.AnimatedContentKt$AnimatedContent$6$1$5.invoke(AnimatedContent.kt:792)
MrJohn10 commented 1 day ago

Do you use the latest library release? As I understand it doesn't support Compose 1.7.0. Support for it was added in #64 , but there was no release with it yet.

StefanOltmann commented 18 hours ago

@MrJohn10 Thanks. I didn't notice that the PR did not make it into a release yet.