ExamerSignUpViewModel

class ExamerSignUpViewModel(    authenticationService: AuthenticationService,     passwordManager: PasswordManager,     credentialsValidationUseCase: CredentialsValidationUseCase,     dispatcherProvider: DispatcherProvider = StandardDispatchersProvider(io = Dispatchers.Main)) : ViewModel, SignUpViewModel, CredentialsValidationUseCase

This is class represents a viewModel for a Sign-up screen.

Parameters

authenticationService

the authentication service to be used.

dispatcherProvider

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 ExamerSignUpViewModel(    authenticationService: AuthenticationService,     passwordManager: PasswordManager,     credentialsValidationUseCase: CredentialsValidationUseCase,     dispatcherProvider: DispatcherProvider = StandardDispatchersProvider(io = Dispatchers.Main))

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
open override fun createNewAccount(    name: String,     email: String,     password: String,     @MainThread onSuccess: () -> Unit,     profilePhotoUri: Uri?)

Used to create a new user account based on the provided name, email,password and optional profilePhotoUri. The onSuccess callback will be called in the event of a successful account creation. In the case of a failure, the uiState's value will be set appropriately.

Link copied to clipboard
open fun <T : Any> getTag(p0: String): T
Link copied to clipboard
open override fun isValidEmail(email: String): Boolean
Link copied to clipboard
open override fun isValidPassword(password: String): Boolean
Link copied to clipboard
open fun onCleared()
Link copied to clipboard
open override fun removeErrorMessage()

Used to change the uiState to a non-error state thereby removing any associated error messages from the UI layer.

Link copied to clipboard
open fun <T : Any> setTagIfAbsent(p0: String, p1: T): T

Properties

Link copied to clipboard
open override val uiState: State<SignUpUiState>