How to detect tap (or any other gesture event) on Positioned widget on another widget in CustomScrollView?

822 Views Asked by At

Here is a widgets tree:

CustomScrollView(Clip.none)
  SliverList
    Column
      HourItem
        SizedBox
          Stack
            Positioned(top: 30)

The result is: Flutter overflow screenshot

I can handle tap area where blue arrow is point on, and can't where red arrow.

If it would be web I would use z-index property, but how can I do the same in Flutter?

1

There are 1 best solutions below

0
On

use GestureDetector

Positioned(top: 30,child: GestureDetector(
                      child:  SomeWidget(),
                      onTap: () {
                        // some action 
                      },
                    ),),