Examer Log In View Model
class ExamerLogInViewModel( authenticationService: AuthenticationService, passwordManager: PasswordManager, dispatcherProvider: DispatcherProvider = StandardDispatchersProvider(io = Dispatchers.Main)) : ViewModel, LogInViewModel
Content copied to clipboard
This is class represents a viewModel for a login screen.
Parameters
authentication Service
the authentication service to be used.
dispatcher Provider
the dispatcher provider that is to be used in the viewModel. By default, it uses an instance of StandardDispatchersProvider. The io dispatcher is changed to Dispatchers.Main because, the data layer ensures that all suspend functions are main safe.
Constructors
Link copied to clipboard
fun ExamerLogInViewModel( authenticationService: AuthenticationService, passwordManager: PasswordManager, dispatcherProvider: DispatcherProvider = StandardDispatchersProvider(io = Dispatchers.Main))
Content copied to clipboard
Functions
Link copied to clipboard
open override fun authenticate( emailAddress: String, password: String, @MainThread onSuccess: () -> Unit)
Content copied to clipboard
Used to authenticate an existing user with the specified emailAddress and password. The onSuccess callback will be called when authentication was successful.
Link copied to clipboard
Link copied to clipboard
Used to change the uiState to a non-error state thereby removing any associated error messages from the UI layer.
Link copied to clipboard
Properties
Link copied to clipboard
A state property the contains the current LoginUiState.