This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// shared module | |
plugins { | |
... | |
id("kotlin-parcelize") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CommonMain | |
@CommonParcelize | |
data class User( | |
val id: Int, | |
val firstname: String | |
): CommonParcelable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ios/js/...Main | |
actual interface CommonParcelable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// androidMain/Pltafrom.kt | |
actual typealias CommonParcelable = Parcelable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// commonMain/Platform.kt | |
expect interface CommonParcelable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// androidMain/Platform.kt | |
actual typealias CommonParcelize = Parcelize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// commonMain/Platform.kt | |
@OptIn(ExperimentalMultiplatform::class) | |
@OptionalExpectation | |
@Target(AnnotationTarget.CLASS) | |
@Retention(AnnotationRetention.BINARY) | |
expect annotation class CommonParcelize() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// androidMain/Platform.kt | |
actual typealias CommonParcelable = Parcelable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// commonMain/Platform.kt | |
expect interface CommonParcelable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typealias MyClass = TooLongAndUglyNameClass | |
fun foo(p: MyClass) { | |
// Some logics | |
} |
NewerOlder