OnBoardingViewModel

class OnBoardingViewModel(val launchSource: LaunchSource, val dispatchersProvider: DispatchersProvider, val router: OnBoardingRouter, val splashNavigationUseCase: SplashNavigationUseCase, val preferenceManager: PreferenceManager, val buildInfoProvider: BuildInfoProvider) : BaseMviViewModel<OnBoardingState, OnBoardingIntent, EmptyEffect> (source)

Coordinates OnBoardingViewModel behavior in the SDAI presentation layer.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor(launchSource: LaunchSource, dispatchersProvider: DispatchersProvider, router: OnBoardingRouter, splashNavigationUseCase: SplashNavigationUseCase, preferenceManager: PreferenceManager, buildInfoProvider: BuildInfoProvider)

Properties

Link copied to clipboard
private val _effect: Channel<E>
Link copied to clipboard
private val _state: MutableStateFlow<S>
Link copied to clipboard

Exposes the buildInfoProvider value used by the SDAI presentation layer.

Link copied to clipboard
Link copied to clipboard

Exposes the dispatchersProvider value used by the SDAI presentation layer.

Link copied to clipboard
open override val effect: Flow<EmptyEffect>
Link copied to clipboard
private val effectDispatcher: CoroutineDispatcher
Link copied to clipboard

Exposes the launchSource value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the preferenceManager value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the router value used by the SDAI presentation layer.

Link copied to clipboard

Exposes the splashNavigationUseCase value used by the SDAI presentation layer.

Link copied to clipboard
open override val state: StateFlow<OnBoardingState>

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
internal expect fun clear()
Link copied to clipboard
protected fun emitEffect(effect: EmptyEffect)
Link copied to clipboard
protected fun emitState(state: OnBoardingState)
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard
protected fun launch(dispatcher: CoroutineDispatcher, start: CoroutineStart, block: suspend CoroutineScope.() -> Unit): Job
Link copied to clipboard
private fun navigate()
Link copied to clipboard
protected expect open fun onCleared()
Link copied to clipboard
open override fun processIntent(intent: OnBoardingIntent)
Link copied to clipboard
protected fun updateState(mutation: (OnBoardingState) -> OnBoardingState)