Skip to content

Autofill Hints not populating in text fields on iOS with Flutter 3.22.0 #148475

@gonciuu

Description

@gonciuu

Steps to reproduce

  1. Update Flutter to version 3.22.0.
  2. Ensure .well-known/apple-app-site-association is correctly configured on the server.
  3. Implement autofill hints in your Flutter app.
  4. Test the autofill functionality on an iOS device.
  5. Try to autofill with some saved credentials

Expected results

Input fields should be automatically populated with relevant data when using autofill on iOS, similar to how it works on Android.

Actual results

Autofill suggestions appear on iOS, but selecting a suggestion does not populate the input fields.

Code sample

 AutofillGroup(
      child: Scaffold(
        body: GoldRippleGradientBackground(
          child: CustomScrollView(slivers: <Widget>[
            SliverFillRemaining(
              hasScrollBody: false,
              child: SafeArea(
                child: Padding(
                  padding:
                      const EdgeInsets.all(Dimensions.defaultScreenPadding),
                  child: Form(
                    key: formKey,
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: <Widget>[
                        const Spacer(),
                          TextFormField(
                            key: const Key('email_sign_in'),
                            autofillHints: const <String>[
                              AutofillHints.email,
                              AutofillHints.username
                            ],
                            decoration: InputDecoration(
                              labelText: context.strings.authEmailLabel,
                            )),
                          TextFormField(
                              key: const Key('password_sign_in'),
                              autofillHints: const <String>[
                                AutofillHints.password,
                              ],
                              decoration: InputDecoration(
                                labelText: context.strings.authPasswordLabel,
                          )),                      
                      ],
                    ),
                  ),
                ),
              ),
            ),
          ]),
        ),
      ),
    );

Screenshots or Video

RPReplay_Final1715851761.1.mp4

Logs

No response

Flutter Doctor output

[✓] Flutter (Channel stable, 3.22.0, on macOS 14.4.1)
• Flutter version 3.22.0 on channel stable at
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5dcb86f (7 days ago), 2024-05-09 07:39:20 -0500
• Engine revision f6344b75dc
• Dart version 3.4.0
• DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK path
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = path
• Java binary at: path
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15F31d
• CocoaPods version 1.15.2

[✓] Chrome - develop for the web
• CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

[✓] Android Studio (version 2023.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] Network resources
• All expected network resources are available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsc: regressionIt was better in the past than it is nowe: OS-version specificAffects only some versions of the relevant operating systemframeworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions