Skip to content

Instantly share code, notes, and snippets.

@tfcporciuncula
Last active May 1, 2023 10:13
Embed
What would you like to do?
actual abstract class ViewModel {
actual val viewModelScope = MainScope()
protected actual open fun onCleared() {}
fun clear() {
onCleared()
viewModelScope.cancel()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment