Flutter autofillhints from a different site

185 Views Asked by At

I'm making a webscrape app project that has a simple login page with email and password autofillhints.

This credentials are the same credentials used in a different website, which i connect to using a headless inappwebview instance to retrieve informations that i then show inside the app.

Is there a way to autofill the username and password used in this different site?

My ui part of code with autofillhints:

Form(
    child: Column(
      children: [
        SizedBox(
          width: 500,

          child: TextFormField(
            decoration: const InputDecoration(
              labelText: "Email",
              icon: Icon(Icons.email),


            ),
            autofillHints: const [AutofillHints.email],
            controller: email,
            keyboardType: TextInputType.emailAddress,

          ),
        ),

        SizedBox(
          width: 500,
          child: TextFormField(
            obscureText: true,
            decoration: const InputDecoration(
              labelText: "Password",
              icon: Icon(Icons.password),
            ),
            validator: (String? val) {
              if (val == null || val.isEmpty) {
                return "Insert valid password";
              }
              return null;
            },
            controller: password,
            autofillHints: const [AutofillHints.password],
            onEditingComplete: () => TextInput.finishAutofillContext(),
          ),
        ),
        Container(
          padding: const EdgeInsets.all(20),
          child: buttonLogin,
        ),
        
      ],
    )),

I have checked nearly every post on this site regarding flutter autofill and checked flutter and android autofill documentation, i found nothing about this specific topic.

0

There are 0 best solutions below