Admin Panel Screen View Model

class AdminPanelScreenViewModel : EquinoxViewModel

The AdminPanelScreenViewModel class is the support class used by the com.tecknobit.brownie.ui.screens.adminpanel.presenter.AdminPanelScreen screen to manage the current session data and to customize his/her language and theme

Author

N7ghtm4r3 - Tecknobit

See also

Retriever.RetrieverWrapper
EquinoxViewModel

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
lateinit var language: MutableState<String>

language the language of the user

Link copied to clipboard
lateinit var password: MutableState<String>

password the value of the password

Link copied to clipboard

passwordError whether the password field is not valid

Link copied to clipboard
Link copied to clipboard
lateinit var theme: MutableState<EquinoxLocalUser.ApplicationTheme>

theme the theme of the user

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
open override fun canRetrieverStart(): Boolean
Link copied to clipboard
fun changeLanguage(onSuccess: () -> Unit? = null)

Method used to execute the language change

Link copied to clipboard
fun changeTheme(onChange: () -> Unit? = null)

Method used to execute the theme change

Link copied to clipboard
fun clearSession(onClear: () -> Unit? = null)

Method used to clear the current localSession session

Link copied to clipboard
open override fun continueToRetrieve(currentContext: KClass<*>): Boolean
Link copied to clipboard
fun deleteSession(onClear: () -> Unit? = null)

Method used to delete the current localSession session

Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard
open override fun restartRetriever()
Link copied to clipboard
open fun restartRetrieverIf(condition: Boolean)
Link copied to clipboard
open override fun retrieve(currentContext: KClass<*>, routine: suspend () -> Unit, repeatRoutine: Boolean, refreshDelay: Long)
Link copied to clipboard
open fun setActiveContext(currentContext: KClass<*>)
Link copied to clipboard
fun showSnackbarMessage(message: String, actionLabel: String?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
fun showSnackbarMessage(response: JsonObject, actionLabel: String?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
fun showSnackbarMessage(message: StringResource, actionLabel: StringResource?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
Link copied to clipboard
open override fun suspendRetriever()
Link copied to clipboard
open fun suspendRetrieverIf(condition: Boolean)