ViewModel

open class ViewModel(viewModelDispatcher: CoroutineDispatcher, uiDispatcher: CoroutineDispatcher)

Inheritors

Constructors

Link copied to clipboard
constructor(viewModelDispatcher: CoroutineDispatcher, uiDispatcher: CoroutineDispatcher)

Properties

Link copied to clipboard
val uiScope: CoroutineScope

This is the main scope for all coroutines launched by MainViewModel. Since we pass viewModelJob, you can cancel all coroutines launched by uiScope by calling viewModelJob.cancel()

Link copied to clipboard
val viewModelScope: CoroutineScope