Auth Screen View Model

class AuthScreenViewModel(snackbarHostState: SnackbarHostState)

The AuthScreenViewModel class is the support class used by the AuthScreen to execute the authentication requests

Author

N7ghtm4r3 - Tecknobit

Parameters

snackbarHostState

: the host to launch the snackbar messages

See also

FetcherManagerWrapper
EquinoxViewModel

Constructors

Link copied to clipboard
constructor(snackbarHostState: SnackbarHostState)

Properties

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

email -> the email of the user

Link copied to clipboard

emailError -> whether the email field is not valid

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

host -> the value of the host to reach

Link copied to clipboard

hostError -> whether the host field is not valid

Link copied to clipboard

isCustomerAuth -> whether the auth request is to execute a customer authentication

Link copied to clipboard
lateinit var isSignUp: MutableState<Boolean>

isSignUp -> whether the auth request to execute is sign up or sign in

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

name -> the name of the user

Link copied to clipboard

nameError -> whether the name field is not valid

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

password -> the password of the user

Link copied to clipboard

passwordError -> whether the password field is not valid

Link copied to clipboard

serverSecret -> the value of the server secret

Link copied to clipboard

serverSecretError -> whether the serverSecret field is not valid

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

surname -> the surname of the user

Link copied to clipboard

surnameError -> whether the surname field is not valid

Functions

Link copied to clipboard
fun auth()

Wrapper function to execute the specific authentication request