Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// User.kt
@Parcelize
data class User(
val id: UUID = UUID.randomUUID(),
val name: String?
) : Parcelable
// ScopedUser.kt
@Parcelize
data class ScopedUser(
val id: UUID = UUID.randomUUID()
) : Parcelable
fun User.toScopedUser() = ScopedUser(
id = id
)
fun ScopedUser.toUser() = User(
id = id
name = null // FIXME
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment