flutter_inappwebview icon indicating copy to clipboard operation
flutter_inappwebview copied to clipboard

set the userAgent to empty, it cannot be restored to the system userAgent

Open tmkook opened this issue 9 months ago • 1 comments

  • [x] I have read the Getting Started section
  • [x] I have already searched for the same problem

Environment

Technology Version
Flutter version 3.19.6
Plugin version ^6.0.0
Android version -
iOS version 17.5
macOS version 14.5
Xcode version 15.4
Google Chrome version -

Device information:

Simulate 17.5

Description

  1. init usreAgent = ""
  2. delay 1 second
  3. set userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15
  4. delay 1 second
  5. set userAgent = "" OR null it cannot be restored to the system userAgent

Expected behavior:

Current behavior:

Steps to reproduce

InAppWebView( keepAlive: keepAlive, initialFile: "URL", initialSettings: InAppWebViewSettings( supportZoom: true, forceDark: ForceDark.AUTO, useShouldInterceptRequest: true, useShouldOverrideUrlLoading: true, allowsInlineMediaPlayback: true, allowsLinkPreview: false, sharedCookiesEnabled: true, useHybridComposition: false,

              userAgent: "",
           
              useShouldInterceptAjaxRequest: true,
            ),
          ));

controller.setSettings(settings: InAppWebViewSettings(userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15"));

delay 1 second

controller.setSettings(settings: InAppWebViewSettings(userAgent:"")); controller.reload();

Images

Stacktrace/Logcat

tmkook avatar May 23 '24 08:05 tmkook