getOrDefault

fun <T> UiState<T>.getOrDefault(default: T): T

Returns the encapsulated data if this state is UiState.Success, or default otherwise.