Alex
09/03/2021, 6:42 AMval data: StateFlow<X>
where X
should be either Loading/Content/Empty.
If I was to write something like that myself it could look something like this:
sealed class ResourceState {
object Loading : ResourceState()
data class Data<T>(val data: T) : ResourceState()
object Empty : ResourceState()
}
Is there an arrow equivalent for situations like this?