AuthViewModel

class AuthViewModel @Inject constructor(loginUseCase: LoginUseCase, registerUseCase: RegisterUseCase, validators: Validators) : ViewModel

ViewModel responsible for handling authentication-related functionality in the application.

The AuthViewModel class is a Hilt-aware ViewModel that manages authentication-related use cases, such as user login and registration, along with validators for input validation.

Constructors

Link copied to clipboard
@Inject
constructor(loginUseCase: LoginUseCase, registerUseCase: RegisterUseCase, validators: Validators)

Types

Link copied to clipboard
sealed class ValidationEvent

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun loginUser()

Initiates the user login process based on the provided email and password in the current state.

Link copied to clipboard

Handles events triggered in the authentication form, updating the state accordingly.

Link copied to clipboard

Initiates the user registration process based on the current state's email, username, and password.

Link copied to clipboard