How to add a Webview in Flutter?

前端 未结 7 1634
逝去的感伤
逝去的感伤 2020-12-15 17:43

I know its possible to add a WebView as a full page but couldn\'t find any sample code to do it. I assume you could use a PageView as it\'s base but not sure how to call the

7条回答
  •  醉话见心
    2020-12-15 18:37

    You can use the below dart plugin to display the Webview.Also, you can find dart plugin from this url: https://pub.dartlang.org/packages/flutter_webview_plugin

    new MaterialApp(
          routes: {
            "/": (_) => new WebviewScaffold(
              url: "https://www.google.com",
              appBar: new AppBar(
                title: new Text("Widget webview"),
              ),
            ),
          },
        );
    

提交回复
热议问题