letsar / overflow_view

A widget displaying children in a line until there is not enough space and showing a the number of children not rendered.
MIT License
175 stars 23 forks source link

Hit test always returns false #10

Open ndelanou opened 1 year ago

ndelanou commented 1 year ago

When wrapping the OverflowView into a GestureDetector, the onTap callback is never called when tapping on the widget.

GestureDetector(
  onTap: () => print('Hit !'), // Never called
  child: OverflowView.flexible(
    children: [Text('A'), Text('B'), Text('C')],
    builder: (context, remaining) => Text('+$remaining'),
  ),
),

I'm using Flutter (Channel beta, 3.13.0-0.2.pre) but I'm unsure it makes any difference

ndelanou commented 2 months ago

My current fix is to change this line by:

return true;