LoginForm constructor
Creates a LoginForm with initial values for username and password.
Both fields are required and must be non-empty for the form to be valid.
Parameters:
initialUsername: The initial username value (typically empty or pre-filled).initialPassword: The initial password value (typically empty for security).
Implementation
LoginForm(String initialUsername, String initialPassword)
: super({
"username": FormControl<String>(
value: initialUsername,
validators: [
Validators.required,
],
),
"password": FormControl<String>(
value: initialPassword,
validators: [
Validators.required,
],
),
});