3

Currently, I am using flutter inappwebview plugin, I want to create an auto-login like google chrome asking if we want to save passwords, and then autofill next time. Is it possible?

Aman Singh
  • 41
  • 2

2 Answers2

0

I suggest you try using webview_flutter_plus. It allows you to call custom JavaScript to modify the website presented through the webview. This answer to a related question provides a nice example: https://stackoverflow.com/a/64001588/13541839

OlegBezr
  • 165
  • 11
0

I got the answer first we need to use some local storage(hive storage) to store the username and password from a userform where user enter username and password and then uses the saved data to inject into webview inputs.

controller.evaluateJavascript(
    //'''var email = document.getElementById("user");''';
    source: '''
              var email = document.getElementById(" Your Email document id from html");
                    var password = document.getElementById("Your Email document id from html");
                    email.value = "$email";
                    password.value = "$pass";               
                  ''');
Aman Singh
  • 41
  • 2