1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 16:41:59 +00:00

feat(mobile): autofill login form (#1128)

This commit is contained in:
Enrico Brambilla 2022-12-20 16:10:31 +01:00 committed by GitHub
parent e824b55c20
commit 8ee7504c45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,6 +94,7 @@ class LoginForm extends HookConsumerWidget {
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 300),
child: SingleChildScrollView(
child: AutofillGroup (
child: Wrap(
spacing: 16,
runSpacing: 16,
@ -196,6 +197,7 @@ class LoginForm extends HookConsumerWidget {
),
),
),
),
);
}
}
@ -229,6 +231,8 @@ class ServerEndpointInput extends StatelessWidget {
validator: _validateInput,
autovalidateMode: AutovalidateMode.always,
focusNode: focusNode,
autofillHints: const [AutofillHints.url],
keyboardType: TextInputType.url,
);
}
}
@ -259,6 +263,8 @@ class EmailInput extends StatelessWidget {
),
validator: _validateInput,
autovalidateMode: AutovalidateMode.always,
autofillHints: const [AutofillHints.email],
keyboardType: TextInputType.emailAddress,
);
}
}
@ -278,6 +284,8 @@ class PasswordInput extends StatelessWidget {
border: const OutlineInputBorder(),
hintText: 'login_form_password_hint'.tr(),
),
autofillHints: const [AutofillHints.password],
keyboardType: TextInputType.text,
);
}
}