Skip to content

Instantly share code, notes, and snippets.

@Kashif-E
Created December 6, 2021 11:09
Show Gist options
  • Save Kashif-E/b5ce251991f9c2e63953d12dff7212d3 to your computer and use it in GitHub Desktop.
Save Kashif-E/b5ce251991f9c2e63953d12dff7212d3 to your computer and use it in GitHub Desktop.
open class BaseViewModel : ViewModel() {
var responseMessage: MutableSharedFlow<Resource.CustomMessages> = MutableSharedFlow()
protected fun onResponseComplete(message : Resource.CustomMessages){
viewModelScope.launch {
responseMessage.emit(message)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment