tap_canvas
0.9.5, released 4 years ago by idiomaticbytes.com
Detect taps outside the currently defined widget and provide a callback.
What it does
TapCanvas allows defining an area on the screen and detecting taps that occur outside of specific child widgets. It provides callbacks when taps occur both inside and outside the defined widgets.
AI-written summary of version 0.9.5, based on the package's README and metadata. Report an inaccuracy
Use it when
- Legacy applications using old Flutter versions that lack TapRegion
Skip it when
- New applications, as the package is deprecated and superseded by Flutter's built-in TapRegion
- Modern projects where standard Material or Cupertino text fields already handle outside taps automatically
Strengths
- Simple API for outside tap detection
- Full code coverage
Weaknesses
- No longer maintained and officially deprecated
- Rendered pointless by Flutter framework's TapRegion
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
not documented
MaterialApp(
home: TapCanvas(
child: MyHomeWidget(),
),
);Alternatives
Packages that do the same job and could replace tap_canvas.
- popover
Displays a transient iOS-style popover view above other content pointing at a control.
89Compare - measure_size
Widget that reports its size changes via a callback.
58Compare - hit
Decouple Flutter layout size from hit-test size to deliver taps outside parent bounds.
68Compare - focus_detector
Detects when your widget appears or disappears from the screen.
50Compare
Works with
Packages commonly used together with tap_canvas: ones it builds on, ones built on it, and its own family.