expand_tap_area
1.1.1, released 4 years ago by malikwang.com
Manually expand the tap area of a widget without changing its size or layout.
What it does
Provides a widget called ExpandTapWidget that allows developers to increase the touch target size of a small widget using padding. It adheres to guidelines like Apple's 44x44px and Android's 48x48dp minimum targets without modifying the layout size.
AI-written summary of version 1.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to make a small icon or button easier to tap without increasing its visual layout size
- You want to meet minimum touch target guidelines (like Apple or Material Design) for small widgets
Skip it when
- The expanded area exceeds the boundary of the Parent Box unexpectedly
- You already handle gestures at multiple conflicting parent/child levels without careful arrangement
Strengths
- Does not change the widget's size or layout
- Includes a debug flag (debugPaintExpandAreaEnabled) to display the actual expanded area
Weaknesses
- Expanded area cannot exceed the boundary of the Parent Box
- Requires careful placement to avoid gesture conflicts when wrapped inside or outside other GestureDetectors
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
not documented
ExpandTapWidget(
onTap: () {},
tapPadding: EdgeInsets.all(25.0),
child: smallWidget(),
)Alternatives
Packages that do the same job and could replace expand_tap_area.
- extra_hittest_area
Manually add extra hitTest area to widgets without changing their layout size.
47Compare - lazy_wrap
A Flutter widget for lazy Wrap-style layouts with fixed or variable item sizes.
72Compare - hit
Decouple Flutter layout size from hit-test size to deliver taps outside parent bounds.
68Compare - tap_builder
A simple widget for building interactive areas with customizable visual effects.
50Compare