map

inline fun <T, R> UiState<T>.map(transform: (T) -> R): UiState<R>

Transforms the UiState.Success data using the given transform function. Non-success states (UiState.Idle, UiState.Loading, UiState.Failure) are passed through unchanged.