Skip to content
pubscout

otp_timer_button

1.1.1, released 3 years ago by an unverified publisher

A Flutter button widget with an integrated timer for resending OTP codes.

WASM-ready
$ flutter pub add otp_timer_button
Source repository

What it does

Provides a customizable button that starts a countdown timer when pressed, preventing users from spamming OTP resend requests. It supports controllers for handling asynchronous operations like loading states before the timer begins.

AI-written summary of version 1.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need an OTP resend button with a countdown timer
  • You want to show a loading state while waiting for an OTP request response

Skip it when

  • You only need standard buttons without any timer functionality

Strengths

  • Easy to implement with minimal setup
  • Includes a controller to manage loading and timer states dynamically
  • Supports customizable styles, durations, and button types

Weaknesses

  • Very narrow and specific use case

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
OtpTimerButtonController controller = OtpTimerButtonController();

OtpTimerButton(
  controller: controller,
  onPressed: () {},
  text: Text('Resend OTP'),
  duration: 60,
)

Alternatives

Packages that do the same job and could replace otp_timer_button.