FonamentViewModel

abstract class FonamentViewModel<U : FonamentUIState>(initialUIState: U) : ViewModel, FonamentEventHandler

Responsible for managing the FonamentEvents and update the uiState that is observed by the FonamentUI.

Constructors

Link copied to clipboard
constructor(initialUIState: U)

Properties

Link copied to clipboard
var uiState: U

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard
open override fun handleEvent(event: FonamentEvent)

Handles the given event.