GardenMobile & interfaces

When an invisible Flutter container misses taps

A small historical hit-testing fix, with the widget-tree assumptions kept visible.

An invisible widget can occupy layout space without participating in hit testing the way a visible surface does. In the original Flutter layout, assigning a transparent color made the intended container area respond to taps:

// @nhancv 10/25/2019: Request color to get gesture tab
color: Colors.transparent,

That records a fix for the earlier widget tree. It does not mean every GestureDetector requires a colored container. Child sizing, hit-test behavior, and competing gesture recognizers all affect the result.

Flutter’s GestureDetector documentation explains invisible children and configurable hit testing. Start with the actual bounds and gesture ownership when a similar symptom appears. The original layout has not been rerun for this revision.

← Back to the garden