2

我在垂直滚动 SingleChildScrollView 中有一个水平滚动的 PageView

  Expanded(
            child: SingleChildScrollView(
              scrollDirection: Axis.vertical,
              child: Column(
                children: <Widget>[
                  _buildItemImage(),
                   PageView.builder(
                     dragStartBehavior: widget.dragStartBehavior,
                     key: ValueKey<DateTime>(widget.selectedDate),
                     controller: widget.DiDidayPickerController,
                     physics: NeverScrollableScrollPhysics(),
                     scrollDirection: Axis.horizontal,
                     itemCount: _monthDelta(widget.firstDate, widget.lastDate) + 1,
                     itemBuilder: _buildItems,
                     onPageChanged: _handleMonthPageChanged,
            )...

问题是当我尝试在 PageView 区域中垂直滚动时,它会拦截滚动事件并且不允许滚动 SingleChildScrollView。如何解决?

在此处输入图像描述

4

0 回答 0