Skip to content

Instantly share code, notes, and snippets.

@fvilarino
Created April 19, 2021 21:38
Show Gist options
  • Save fvilarino/2058d74db39826cfe17c9ac8470f8006 to your computer and use it in GitHub Desktop.
Save fvilarino/2058d74db39826cfe17c9ac8470f8006 to your computer and use it in GitHub Desktop.
Compose State Classes
sealed class ForecastItem {
data class ForecastHeader(
val id: Long,
val date: String,
val sunrise: String,
val sunset: String,
) : ForecastItem()
data class ForecastCard(
val id: Long,
val header: String,
@DrawableRes val iconId: Int,
val minTemperature: String,
val maxTemperature: String,
val feelsLikeTemperature: String,
val windSpeed: String,
val humidity: String,
val visibility: String,
) : ForecastItem()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment