Skip to content

An iOS style countdown timer. Inspired by the native timer app on iOS

License

Notifications You must be signed in to change notification settings

clean/clean_countdown

Repository files navigation

clean_countdown

An iOS style timer widget based on cupertino_timer with some extra params added

param Description
showRing Allow to show/hide animated ring around counter (default: true)
startStopOnTap Set whether or not the widget should stop/start counter onTap (default: true)
controller CleanCountdownController
controller.isCounting Allows to check if counter is running
controller.start() Start counting
controller.stop() Stop counting
controller.reset() Reset counter
controller.setNewDuration(Duration duration) Set new duration

Example

Usage

CleanCountdown(
    size: 300,
    header: Center(child: Text('Header')),
    footer: Center(child: Text('Footer')),
    duration: Duration(minutes: 1),
    controller: CleanCountdownController(
        onCompleted: () {
            setState({
                ...
            });
        },
    ),
    startOnInit: true,
    timeStyle: TextStyle(
        fontWeight: FontWeight.bold),
    ringColor: Colors.red,
    ringStroke: 10,
    )

About

An iOS style countdown timer. Inspired by the native timer app on iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages