SignUpViewModel

class SignUpViewModel @Inject constructor(authRepository: AuthRepository) : ViewModel

ViewModel for the sign-up screen, managing user registration and form validation.

This ViewModel handles new user registration with both Google Sign-In and email/password methods. Similar to dev.atick.feature.auth.ui.signin.SignInViewModel, it demonstrates form validation with TextFiledData using updateState for field updates and updateWith for async registration operations.

Form validation uses extension functions:

Parameters

authRepository

Repository providing authentication and registration operations.

See also

Immutable data class representing registration form state

State wrapper with loading and error handling

Extension function for synchronous state updates

Extension function for async operations

Data class for text field state with validation

Data layer interface for authentication

Constructors

Link copied to clipboard
@Inject
constructor(authRepository: AuthRepository)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun updateEmail(email: String)
Link copied to clipboard
fun updateName(name: String)
Link copied to clipboard
fun updatePassword(password: String)