ViewModelKt

Added in 2.1.0

public final class ViewModelKt


Summary

Public methods

static final @NonNull CoroutineScope

CoroutineScope tied to this ViewModel.

Public methods

getViewModelScope

public static final @NonNull CoroutineScope getViewModelScope(@NonNull ViewModel receiver)

CoroutineScope tied to this ViewModel. This scope will be canceled when ViewModel will be cleared, i.e ViewModel.onCleared is called

This scope is bound to Dispatchers.Main.immediate