Skip to content

Instantly share code, notes, and snippets.

@EudyContreras
Created April 14, 2020 21:37
Show Gist options
  • Save EudyContreras/473f40bf51461d332f7769a33246cf33 to your computer and use it in GitHub Desktop.
Save EudyContreras/473f40bf51461d332f7769a33246cf33 to your computer and use it in GitHub Desktop.
sealed class DemoData: DiffComparable {
abstract val id: String
override fun getIdentifier() = id
data class A(
override val id: String,
val text: String,
val imageUrl: String
) : DemoData()
data class B(
override val id: String,
val textOne: String,
val textTwo: String,
val textThree: String,
val imageUrl: String
) : DemoData()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment