Skip to content
pubscout

countdown_widget

2.0.2, released 4 years ago by tbm98.dev

A timer widget that continues to work correctly even when the app is locked.

WASM-ready
$ flutter pub add countdown_widget
Source repository

What it does

Provides a CountDownWidget that tracks time with a configurable duration and step duration. It exposes the remaining duration through a builder function and a callback.

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

Use it when

  • You need a countdown timer displayed in the UI that must remain accurate even if the device locks.
  • You want a simple widget-based timer with callback support for duration changes.

Skip it when

  • You need complex background task execution rather than just a UI countdown widget.
  • You require advanced state management integration beyond the provided builder pattern.

Strengths

  • Works correctly even if the app is locked.
  • Provides a simple builder pattern to easily render remaining time.
  • Supports autoStart configuration and custom step durations.

Weaknesses

  • Very limited documentation and configuration options beyond basic countdown features.
  • No alternative packages available in the catalog to compare against.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

not documented

Scaffold(
      body: Center(
        child: CountDownWidget(
          duration: Duration(seconds: 20),
          builder: (context, duration) {
            return Text(duration.inSeconds.toString());
          },
          onDurationRemainChanged: (duration) {
            print('duration:${duration.toString()}');
          },
        ),
      },
)

Alternatives

Packages that do the same job and could replace countdown_widget.

Works with

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