icerockdev / moko-widgets

Multiplatform UI DSL with screen management in common code for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev
Apache License 2.0
387 stars 32 forks source link

How to add multiple arguments to Route #265

Closed Diy2210 closed 4 years ago

Diy2210 commented 4 years ago

How to add multiple arguments to Route<?, ?, ?> if Route have one arg?

Снимок экрана 2020-07-20 в 17 47 45

Снимок экрана 2020-07-20 в 17 51 29

Снимок экрана 2020-07-20 в 17 51 37

Alex009 commented 4 years ago

@Diy2210 just build @Parcelable class for argument data.

@Parcelize
data class Arg(val title: String, val url: String, val token: String): Parcelable
Diy2210 commented 4 years ago

@Diy2210 just build @parcelable class for argument data.

@Parcelize
data class Arg(val title: String, val url: String, val token: String): Parcelable

I build Parcelize, but I get error in App.class: Снимок экрана 2020-07-20 в 18 14 40

Снимок экрана 2020-07-20 в 18 14 24

Снимок экрана 2020-07-20 в 18 13 13

Снимок экрана 2020-07-20 в 18 14 00

Снимок экрана 2020-07-20 в 18 14 13

Alex009 commented 4 years ago

@Diy2210 your route require Arg type of argument...here sample of argument pass - https://github.com/icerockdev/moko-widgets/blob/d454975028bb036a74fc0af7230dde49643be802/sample/mpp-library/src/commonMain/kotlin/App.kt#L363

Diy2210 commented 4 years ago

@Diy2210 your route require Arg type of argument...here sample of argument pass -

https://github.com/icerockdev/moko-widgets/blob/d454975028bb036a74fc0af7230dde49643be802/sample/mpp-library/src/commonMain/kotlin/App.kt#L363

Tnx again!