Add auto fill hints
This commit is contained in:
parent
ee0d2bdf7e
commit
5257752dd3
|
|
@ -21,6 +21,7 @@ class DecoratedFormField extends StatelessWidget {
|
|||
this.suffixIcon,
|
||||
this.expands = false,
|
||||
this.autofocus = false,
|
||||
this.autofillHints,
|
||||
}) : super(key: key);
|
||||
|
||||
final TextEditingController controller;
|
||||
|
|
@ -41,6 +42,7 @@ class DecoratedFormField extends StatelessWidget {
|
|||
final ValueChanged<String> onFieldSubmitted;
|
||||
final ValueChanged<String> onChanged;
|
||||
final Icon suffixIcon;
|
||||
final Iterable<String> autofillHints;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -77,6 +79,7 @@ class DecoratedFormField extends StatelessWidget {
|
|||
}
|
||||
},
|
||||
enabled: enabled,
|
||||
autofillHints: autofillHints,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -416,6 +416,7 @@ class _LoginState extends State<LoginView> {
|
|||
: null,
|
||||
onFieldSubmitted: (String value) =>
|
||||
FocusScope.of(context).nextFocus(),
|
||||
autofillHints: [AutofillHints.email],
|
||||
),
|
||||
if (_emailLogin && !_recoverPassword)
|
||||
TextFormField(
|
||||
|
|
@ -464,6 +465,11 @@ class _LoginState extends State<LoginView> {
|
|||
keyboardType: TextInputType.visiblePassword,
|
||||
onFieldSubmitted: (String value) =>
|
||||
FocusScope.of(context).nextFocus(),
|
||||
autofillHints: [
|
||||
_createAccount
|
||||
? AutofillHints.newPassword
|
||||
: AutofillHints.password
|
||||
],
|
||||
),
|
||||
if (_isSelfHosted)
|
||||
TextFormField(
|
||||
|
|
|
|||
Loading…
Reference in New Issue