Search code examples
webviewflutteruser-agent

How to use user-agent in webview-flutter Flutter?


I tried to use webview_flutter plugin in Flutter. But cannot find to set useragent in there. It's should be there right ? it's a basic function of webview. Is there any possibility way to achieve that ? Thank you in advance.


Solution

  • webview_flutter: ^0.3.13
    

    introduced user agent, so now it could be used easily, like

    WebView(
      userAgent: "random",
      initialUrl: "https://stackoverflow.com/questions/54102162/how-to-use-user-agent-in-webview-flutter-flutter",
    )