-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch: autocompletado en login (#43)
Realmente no tengo idea si esto era un problema en Android, pero si lo era acá esta el fix :D Co-authored-by: Tomás L <[email protected]>
- Loading branch information
Showing
2 changed files
with
43 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,37 +143,46 @@ class _LoginScreenState extends State<LoginScreen> { | |
), | ||
), | ||
Container(height: constraints.maxHeight * 0.1), | ||
LoginTextFormField( | ||
controller: _correoController, | ||
hintText: '[email protected]', | ||
labelText: 'Correo UTEM', | ||
textCapitalization: TextCapitalization.none, | ||
keyboardType: TextInputType.emailAddress, | ||
inputFormatters: [ | ||
FilteringTextInputFormatter.deny(RegExp(" ")), | ||
], | ||
icon: Icons.person, | ||
validator: (String value) { | ||
if (value.isEmpty) { | ||
return 'Debe ingresar un correo UTEM'; | ||
} else if (value.contains("@") && | ||
!value.endsWith("@utem.cl")) { | ||
return 'Debe ingresar un correo UTEM'; | ||
} | ||
}, | ||
), | ||
LoginTextFormField( | ||
controller: _contraseniaController, | ||
hintText: '• • • • • • • • •', | ||
labelText: 'Contraseña', | ||
textCapitalization: TextCapitalization.none, | ||
icon: Icons.lock, | ||
obscureText: true, | ||
validator: (String value) { | ||
if (value.isEmpty) { | ||
return 'Debe ingresar una contraseña'; | ||
} | ||
}, | ||
AutofillGroup( | ||
child: Column( | ||
children: [ | ||
LoginTextFormField( | ||
controller: _correoController, | ||
hintText: '[email protected]', | ||
labelText: 'Correo UTEM', | ||
textCapitalization: TextCapitalization.none, | ||
keyboardType: TextInputType.emailAddress, | ||
inputFormatters: [ | ||
FilteringTextInputFormatter.deny( | ||
RegExp(" ")), | ||
], | ||
icon: Icons.person, | ||
autofillHints: [AutofillHints.username], | ||
validator: (String value) { | ||
if (value.isEmpty) { | ||
return 'Debe ingresar un correo UTEM'; | ||
} else if (value.contains("@") && | ||
!value.endsWith("@utem.cl")) { | ||
return 'Debe ingresar un correo UTEM'; | ||
} | ||
}, | ||
), | ||
LoginTextFormField( | ||
controller: _contraseniaController, | ||
hintText: '• • • • • • • • •', | ||
labelText: 'Contraseña', | ||
textCapitalization: TextCapitalization.none, | ||
icon: Icons.lock, | ||
obscureText: true, | ||
autofillHints: [AutofillHints.password], | ||
validator: (String value) { | ||
if (value.isEmpty) { | ||
return 'Debe ingresar una contraseña'; | ||
} | ||
}, | ||
) | ||
], | ||
), | ||
), | ||
TextButton( | ||
onPressed: () => _login(), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters