3

I have a ListView inside a PageView, so I have a vertical scroll (ListView) and a horizontal scroll (PageView). My problem is that the horizontal scroll is much more sensitive than the vertical scroll, it becomes difficult to perform the vertical scroll because it is almost always taken as lateral.

My idea is to limit the horizontal scroll area so that the vertical scroll predominates in the largest area of the screen:

areas where I want to limit the scroll

Is this possible? How should I do it?

PageController  pageController = new PageController();

return Scaffold
(
    body: Stack
    (
      children: <Widget>
      [
        widfondo(), 
        Column
        (
          children: <Widget>
          [
            widAppBar(context, cuento),
            Expanded
            (
              child: PageView.builder
              (
                itemCount: cantidadDePaginas,
                dragStartBehavior: DragStartBehavior.down,
                //physics: BouncingScrollPhysics(),
                onPageChanged: (index)
                {
                  setState(() 
                  {
                    numeroPagina = ++index;
                  });
                },
                controller: pageController,
                itemBuilder: (BuildContext context, int index)
                {
                  return widCuerpo(context, cuento, index);
                },
              ),
            )
          ],
        )
      ],
    ),
);

  Widget widCuerpo(BuildContext context, Cuento cuento, int numPagina)
  {
    return  ListView
    (
      scrollDirection: Axis.vertical,
      children: <Widget>
      [
        widTituloCuerpo(context, cuento),
        widTextoCuerpo(context, cuento),
      ], 
    );
  }

I was seeing other similar questions and I have seen that they use a PageController, but I am not sure if it is possible to do it this way.

Thanks in advance.

PabloBazan
  • 33
  • 4

0 Answers0