Flutter Web:在 TextFormField 中未触发自动填充密码建议

Ger*_*ero 8 autocomplete autofill flutter flutter-web password-manager

我正在尝试使用 Google 密码管理器自动填充电子邮件和密码。这似乎适用于 Android,但不适用于 Web。

例子:

Form(
    key: key,
    child: AutofillGroup(
      child: Column(
        children: [
          TextFormField(
            autofillHints: const [AutofillHints.email],
            keyboardType: TextInputType.emailAddress,
            textInputAction: TextInputAction.next,
          ),
          TextFormField(autofillHints: const [AutofillHints.password],),
          ElevatedButton(
            onPressed: (){
              TextInput.finishAutofillContext();
              Navigator.of(context).pushReplacementNamed('/home');
            },
            child: const Text('Login'),
          ),
        ],
      ),
    ),
  ),
Run Code Online (Sandbox Code Playgroud)

当我按下“登录”按钮时,浏览器(Google Chrome)会显示一个弹出窗口,允许我使用密码管理器保存电子邮件和密码,然后转到主屏幕。

问题是当我尝试再次登录时:电子邮件和密码已保存,但它们不会自动填充,或者当我单击任何字段时甚至不会显示为建议。 弹出窗口

注意:我已经链接了谷歌帐户并打开了同步。

屏幕截图:具有自动填充和建议行为的常见网站 这在我的应用程序中不起作用。

Mil*_*lia 6

GitHub 上有人已经在 Flutter Repository 上提交了此问题(无自动填充建议)

问题在 Flutter 的官方存储库中处于开放状态。您可以在此处检查相关更新

希望能帮助到你。