Skip to content
pubscout

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.

WASM-readyUses material_ui
$ flutter pub add timer_button
Source repository

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.

Works with

Packages commonly used together with timer_button: ones it builds on, ones built on it, and its own family.