Flutter inappwebview 无法加载

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

我正在努力从 flutter_inappwebview 包实现 inappwebview 。但是当运行以下代码时,它只在我的屏幕上显示 url 字符串。

body: SingleChildScrollView(
    child: Center(
      child: Column(children: [
        SizedBox(
            height: 200,
            child: InAppWebView(
              initialUrlRequest: URLRequest(url: WebUri.uri(UriData.fromString("https://stackoverflow.com/questions/77757847/uri-cant-be-assigned-to-weburi").uri)), // test
              onWebViewCreated: (controller) {
                inAppWebViewController = controller;
              },
              onProgressChanged: (controller, progress) {
                setState(() {
                  _progress = progress / 100;
                });
              },
            )),

enter image description here

我想在我的网站内打开一个网络视图并获取其上的网址更改。 请帮我解决这个问题。

flutter
1个回答
0
投票

参考此文件获取您使用过的包InAppWebViewExample.dart

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