Android Generic UiState
sealed class UiState<out T> {
data class Success<out T>(val data: T) : UiState<T>()
data class Error(val exception: Throwable) : UiState<Nothing>()
object Loading : UiState<Nothing>()
}
Development record of developer who study hard everyday.
sealed class UiState<out T> {
data class Success<out T>(val data: T) : UiState<T>()
data class Error(val exception: Throwable) : UiState<Nothing>()
object Loading : UiState<Nothing>()
}
댓글 없음:
댓글 쓰기