tap_debouncer
2.2.0, released 4 years ago by blean.vip
A widget that wraps buttons and disables taps while the tap callback is in progress.
WASM-ready
What it does
TapDebounce disables button taps automatically while an asynchronous callback is executing. It prevents accidental double-taps and allows configuring a cooldown duration or custom busy UI states.
AI-written summary of version 2.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to prevent users from rapidly tapping buttons multiple times
- You need to disable navigation pop buttons during asynchronous operations
Skip it when
- You need global state management instead of widget-level debouncing
Strengths
- Simplifies preventing double-taps on buttons
- Supports custom cooldown durations and exception handling
- Provides builder callbacks to alter widget appearance during busy states
Weaknesses
- Limited to tap debouncing on a per-widget basis
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
not documented
TapDebouncer(
onTap: () async => await someLongOperation(),
builder: (BuildContext context, TapDebouncerFunc? onTap) {
return RaisedButton(
onPressed: onTap,
child: const Text('Short'),
);
},
)Alternatives
Packages that do the same job and could replace tap_debouncer.
- progress_state_button
A customizable progress button widget with multiple states for Flutter.
50Compare - rounded_loading_button_plus
Animated button with loading, success and error states for Flutter.
50Compare - float_bubble
A floating bubble button inspired by the Tokopedia application.
43Compare - slide_to_confirm
A slider that triggers a callback when slid to 100%.
50Compare