extra_hittest_area
1.0.0, released 2 years ago by fluttercandies.com
Manually add extra hitTest area to widgets without changing their layout size.
What it does
Provides wrapper widgets like GestureDetectorHitTestWithoutSizeLimit and layout variants such as StackHitTestWithoutSizeLimit to expand the touch target area beyond the visual bounds of a widget without modifying its layout size.
AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to make a small icon button easier to tap by increasing its hit test area.
- A touch target needs to extend outside of its parent widget bounds.
Skip it when
- You want to actually resize the widget and its layout bounds rather than just the hit test area.
Strengths
- Does not alter widget size or layout.
- Provides debugging colors to visualize extra hit test areas.
- Supports multiple layout and listener widget variants.
Weaknesses
- Requires using specific custom wrapper widgets instead of standard Flutter widgets.
- Limited documentation beyond the README.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
return GestureDetectorHitTestWithoutSizeLimit(
child: mockButtonUI(text),
extraHitTestArea: const EdgeInsets.all(16),
onTap: () {},
);Alternatives
Packages that do the same job and could replace extra_hittest_area.
- expand_tap_area
Manually expand the tap area of a widget without changing its size or layout.
50Compare - lazy_wrap
A Flutter widget for lazy Wrap-style layouts with fixed or variable item sizes.
72Compare - tap_builder
A simple widget for building interactive areas with customizable visual effects.
50Compare - shadow_widget
A widget that adds a shadow effect to any Flutter widget.
49Compare