fluttercommunity / fluttercommunity/flutter_webview_plugin
How to set flutter_webview_plugin userAgent with old userAgent and custom string
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 938
- PR merge metrics
- No merged PRs in 30d
Description
If I didn't set userAgent,the userAgent was "Mozilla/5.0 (Linux; Android 7.0; MI 5 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36".
Now I set userAgent with the userAgent attribute as:
```
WebView(
...
userAgent: 'myApp'
)
```
the userAgent just myApp
**but lost the platform and other userAgent message** ,
I want set userAgent was
"Mozilla/5.0 (Linux; Android 7.0; MI 5 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36 myApp"
what can I do?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the WebView(...) userAgent entry point and trace how flutter_webview_plugin passes the value to the native WebView. Confirm the reported replacement behavior; done should mean the platform user agent remains available with the requested custom text appended, with the relevant behavior covered by a project test if one exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter, java
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100