Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.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
Flutter 如何组合SingleChildScrollView和垂直旋转木马?_Flutter_Flutter Dependencies - Fatal编程技术网

Flutter 如何组合SingleChildScrollView和垂直旋转木马?

Flutter 如何组合SingleChildScrollView和垂直旋转木马?,flutter,flutter-dependencies,Flutter,Flutter Dependencies,我结合了SingleChildScrollView和CarouselSlider。但当我向下滚动图像时,SingleChildScrollView会截取以移动下一个图像 如何解决此问题?您的意思是旋转木马拦截它吗?我的意思是仅滚动SingleChildScrollView,但旋转木马的滚动不起作用。您可以禁用SingleChildScrollView的滚动物理功能 CarouselSlider( options: CarouselOptions( autoPlay: false,

我结合了SingleChildScrollView和CarouselSlider。但当我向下滚动图像时,SingleChildScrollView会截取以移动下一个图像


如何解决此问题?

您的意思是旋转木马拦截它吗?我的意思是仅滚动SingleChildScrollView,但旋转木马的滚动不起作用。您可以禁用SingleChildScrollView的滚动物理功能
CarouselSlider(
  options: CarouselOptions(
    autoPlay: false,
    enableInfiniteScroll: false,
    height: MediaQuery.of(context).size.height,
    enlargeCenterPage: false,
    viewportFraction: 1,
    initialPage: 0,
    scrollDirection: Axis.vertical,
    pageSnapping: false,
    onPageChanged: (index, reason) {
      setState(() {
        _currentSlider = index;
      });
    }),
  items: images.map((e) {
    return Builder(
      builder: (BuildContext context) {
      return Center(
        child: SingleChildScrollView(
          child: Image.memory(
            e,
            fit: BoxFit.fitWidth,
          ),
        ),
      );
    },
  );
  }).toList(),
  carouselController: _controller,
  ),