Hey guys, what's the arrow class to use for a resource that can be either loading/content/empty?
For example I have a Repository that is loading the data and I want to tell consumers about this, something like
val 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:
Copy code
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?