我的页面中有一个旋转滑块,可以水平滚动。我还使用SingleChildScrollView垂直滑动整个页面。但问题是,当我尝试滚动页面(垂直(时,当我的手指在滑块区域滚动时,页面不会滚动。如何使其能够为滑块水平滚动,为页面垂直滚动?
我的代码的当前结构是:
SingleChildScrollView(
scrollDirection: Axis.vetical,
child: Column(
children [
CarouselSlider(...)
],
),
);
请尝试以下代码。这是我的完整代码:api_calling_demo
SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CarouselSlider.builder(
options: CarouselOptions(
height: 400,
viewportFraction: 0.75,
enableInfiniteScroll: true,
autoPlay: true,
autoPlayInterval: Duration(seconds: 4),
autoPlayAnimationDuration: Duration(milliseconds: 1500),
autoPlayCurve: Curves.fastOutSlowIn,
enlargeCenterPage: true,
),
itemCount: _upcomingMoviesList.length,
itemBuilder: (BuildContext context, int itemIndex, int pageViewIndex) {
final data = _upcomingMoviesList[itemIndex];
return ItemHomeMovie(data);
},
),
],
),
)