Base Cr View Model
abstract class BaseCrViewModel<S : ViewState> : BaseViewModel<S> , CoroutineScopeOwner
Content copied to clipboard
Base ViewModel class prepared for providing data to UI through LiveData and obtaining data from Stores (Repositories) by executing Coroutine based use cases like UseCase and FlowUseCase.
Constructors
BaseCrViewModel
Link copied to clipboard
fun BaseCrViewModel()
Content copied to clipboard
Functions
clear
Link copied to clipboard
defaultErrorHandler
Link copied to clipboard
This method is called when coroutine launched with launchWithHandler throws an exception and this exception isn't CancellationException.
execute
Link copied to clipboard
open fun <T> FlowUseCase<Unit, T>.execute(config: CoroutineScopeOwner.FlowUseCaseConfig.Builder<T>.() -> Unit)
Content copied to clipboard
open fun <ARGS, T> FlowUseCase<ARGS, T>.execute(args: ARGS, config: CoroutineScopeOwner.FlowUseCaseConfig.Builder<T>.() -> Unit)
Content copied to clipboard
getWorkerDispatcher
Link copied to clipboard
launchWithHandler
Link copied to clipboard
observeEvent
Link copied to clipboard
fun observeEvent(lifecycleOwner: LifecycleOwner, eventClass: KClass<out Event<S>>, observer: (Event<S>) -> Unit)
Content copied to clipboard
observeWithoutOwner
Link copied to clipboard
setTagIfAbsent
Link copied to clipboard
Properties
coroutineScope
Link copied to clipboard
internalSavedStateHandle
Link copied to clipboard
requireSavedStateHandle
Link copied to clipboard