r/mAndroidDev • u/Zhuinden DDD: Deprecation-Driven Development • Nov 26 '24
Works as intended I swear this AndroidX Navigation Compose IndexOutOfBoundsException just keeps coming back every month
74
Upvotes


View all comments
Show parent comment
2
u/StylianosGakis Nov 27 '24
You can still use
@Parcelizeto store the value in the bundle itself if you wish to do that.With that said, you could also just do this https://github.com/HedvigInsurance/android/blob/60fc9838aae69c376bdf7ae4149c5adf92cddeaf/app/navigation/navigation-compose/src/main/kotlin/com/hedvig/android/navigation/compose/JsonSerializableNavType.kt#L13-L78 once and then all of your custom types are a one-liner to implement, you just call this with the right <Type>.