-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Description
I am attempting to use an Autofill service for my login screen and the behaviour has been inconsistent, especially across services.
I wanted to use the Google Autofill service primarily for testing, but when I do, TextInput.finishAutofillContext() never prompts the user. Instead when I use LastPass, TextInput.finishAutofillContext() usually prompts the user (though sometimes it doesn't) however LastPass doesn't recognize the (email, username) hints and instead only the password.
I realize each Autofill service may behave differently, but I have yet to find a fully working (save + grouped email/password) implementation.
This is a simplified version of what I'm trying to do:
return AutofillGroup(
child: Column(
children: [
TextField(
autofillHints: [
AutofillHints.email,
// AutofillHints.username,
],
keyboardType: TextInputType.emailAddress,
textInputAction: TextInputAction.next,
),
TextField(
autofillHints: [
AutofillHints.password,
],
keyboardType: TextInputType.visiblePassword,
textInputAction: TextInputAction.done,
obscureText: true,
onSubmitted: (_) =>
TextInput.finishAutofillContext(shouldSave: true),
),
],
),
);
Flutter Doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 1.24.0-4.0.pre.64, on Microsoft Windows [Version 10.0.19041.572], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 4.0)
[√] VS Code (version 1.50.0)
[√] Connected device (4 available)
@LongCatIsLooong keying you in, as I've seen you across multiple related threads