timer_button
2.4.2, released 6 days ago by dart.nonstopio.com
A Flutter button widget that becomes enabled after a designated time interval.
What it does
Provides a customizable timer button widget that stays disabled or counts down for a specified number of seconds before allowing user interaction. Supports multiple built-in button styles like ElevatedButton and TextButton, as well as a custom builder.
AI-written summary of version 2.4.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a resend OTP button with a cooldown timer.
- You want to force users to wait before accepting terms or clicking an action button.
Skip it when
- You need complex state management architectures.
- You require custom animations outside the standard countdown display.
Strengths
- Supports multiple button types (Elevated, Text, Outline, Custom).
- Easy to set up with duration and color configuration.
Weaknesses
- Limited to a single specific use-case widget.
- Not documented for complex customized timer state outside built-in properties.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
TimerButton(
label: "Try Again",
timeOutInSeconds: 5,
onPressed: () {
log("Time for some action!");
},
)Alternatives
Packages that do the same job and could replace timer_button.
- progress_state_button
A customizable progress button widget with multiple states for Flutter.
50Compare - wheel_picker
A customizable wheel scroll picker widget for selecting values or time.
80Compare - simple_shadow
Customizable drop shadow widget for any child
45Compare - custom_timer
A customizable timer widget with millisecond support and a controller.
45Compare
Works with
Packages commonly used together with timer_button: ones it builds on, ones built on it, and its own family.