Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: Is it possible to click through a PageView?

Tags:

flutter

dart

Trying to make widgets behind a PageView clickable by wrapping it around a GestureDetector but it doesn't work. Is there another way I can do this?

new GestureDetector(
  behavior: HitTestBehavior.translucent,
  child: new PageView(
    controller: _pageController,
    children: _buildForegroundPages(),
  ),
),
like image 508
braulio.cassule Avatar asked Mar 27 '18 10:03

braulio.cassule


Video Answer


1 Answers

Try using the IgnorePointer class: https://docs.flutter.io/flutter/widgets/IgnorePointer-class.html

A widget that is invisible during hit testing.

like image 97
Boni2k Avatar answered Oct 27 '22 01:10

Boni2k