flutter_inappwebview
flutter_inappwebview copied to clipboard
set the userAgent to empty, it cannot be restored to the system userAgent
- [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
- init usreAgent = ""
- delay 1 second
- 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
- delay 1 second
- 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();