Last active
July 18, 2022 18:44
-
-
Save cohenItay/f1f896694afeae598d2ebebcb04b3fdc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class DataWithState( | |
val isLoading: Boolean = false | |
val myError: MyErrorModel? = null | |
val myConcreteData: MyConcerteDataModel = null | |
) | |
class MyViewModel(...) { | |
... | |
val myData: StateFlow<DataWithState> = MutableStateFlow() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment