如何在应用内浏览器窗口中打开链接

问题描述 投票:0回答:1

我想知道如何在应用内浏览器中打开链接,就像这样:

in-app browser

flutter inappbrowser
1个回答
2
投票

您可以使用flutter_web_browser插件以Android chrome标签页样式打开应用内网页。

Ex:

body: new Center(
          child: new RaisedButton(
            onPressed: () => openBrowserTab(),
            child: new Text('Open website'),
          ),
        ),


openBrowserTab() async {
    await FlutterWebBrowser.openWebPage(url: "https://gadgets.ndtv.com/", androidToolbarColor: Colors.deepPurple);
  }

结果:

enter image description here

希望这会有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.