fix: Autofillhints on readonly

This commit is contained in:
Christian Pauly 2021-02-01 21:39:34 +01:00
commit 072d65b46d
3 changed files with 6 additions and 4 deletions

View file

@ -92,10 +92,11 @@ class _SignUpState extends State<SignUp> {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12.0),
child: TextField(
readOnly: loading,
autocorrect: false,
controller: usernameController,
onSubmitted: (s) => signUpAction(context),
autofillHints: [AutofillHints.newUsername],
autofillHints: loading ? null : [AutofillHints.newUsername],
decoration: InputDecoration(
prefixIcon: Icon(Icons.account_circle_outlined),
hintText: L10n.of(context).username,