Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何在Flatter中的DragableScrollableSheet中实现可滚动WebView?_Android_Flutter_Dart_Flutter Layout - Fatal编程技术网

Android 如何在Flatter中的DragableScrollableSheet中实现可滚动WebView?

Android 如何在Flatter中的DragableScrollableSheet中实现可滚动WebView?,android,flutter,dart,flutter-layout,Android,Flutter,Dart,Flutter Layout,我试图显示一个模式的底部工作表,它利用了一个DragableScrollableSheet,当点击一张卡时,它又包含一个WebView。WebView应该是可滚动的,因为它包含一个长网页。我使用DragableScrollableSheet是因为我希望在到达网页顶部后向上滚动时能够关闭底部的工作表 这就是我到目前为止所做的: onTap: () { showModalBottomSheet( context: context, isScrollCont

我试图显示一个模式的底部工作表,它利用了一个DragableScrollableSheet,当点击一张卡时,它又包含一个WebView。WebView应该是可滚动的,因为它包含一个长网页。我使用DragableScrollableSheet是因为我希望在到达网页顶部后向上滚动时能够关闭底部的工作表

这就是我到目前为止所做的:

onTap: () {
      showModalBottomSheet(
        context: context,
        isScrollControlled: true,
        builder: (_) {
          return DraggableScrollableSheet(
            expand: false,
            builder: (_, scrollController) {
              return Container(
                child: WebView(
                  initialUrl: this.newsUrl,
                  javascriptMode: JavascriptMode.unrestricted,
                ),
              );
            },
          );
        },
      );
    }
但是,在代码的当前状态下,WebView不可滚动。我唯一能做的就是把床单弹下来合上。DragableScrollableSheet中的小部件必须使用DragableScrollableSheet提供的ScrollController才能正常工作,但我还没有找到将此ScrollController与WebView一起使用的方法。我尝试用SingleChildScrollView包装WebView,但没有成功

我在想,我还没有找到解决这个问题的办法。感谢您的任何帮助