Skip to content

Instantly share code, notes, and snippets.

@saeedashrafy
Last active February 9, 2021 15:55
Show Gist options
  • Save saeedashrafy/90e819ad97c9f96c77afeec63f1cab05 to your computer and use it in GitHub Desktop.
Save saeedashrafy/90e819ad97c9f96c77afeec63f1cab05 to your computer and use it in GitHub Desktop.
class HomeViewModel(private val getFoodsUseCase: GetFoodUseCase) : ViewModel() {
private val _intentFlow = MutableSharedFlow<ViewIntent>(extraBufferCapacity = 64)
val viewState: StateFlow<ViewState>
suspend fun processIntents(viewIntent: ViewIntent) = _intentFlow.emit(viewIntent)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment