Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
872 views
in Technique[技术] by (71.8m points)

webview - 如何在webview-flutter Flutter中使用用户代理?(How to use user-agent in webview-flutter Flutter?)

I tried to use webview_flutter plugin in Flutter.

(我试图在Flutter中使用webview_flutter插件。)

But cannot find to set useragent in there.

(但是找不到在其中设置useragent。)

It's should be there right ?

(应该在那里吗?)

it's a basic function of webview.

(这是webview的基本功能。)

Is there any possibility way to achieve that ?

(有没有办法实现这一目标?)

Thank you in advance.

(先感谢您。)

  ask by Luki Juon translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
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",
)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...