seconds_countdown_timer 0.2.3 copy "seconds_countdown_timer: ^0.2.3" to clipboard
seconds_countdown_timer: ^0.2.3 copied to clipboard

package that provide countdown timer with customized widget.

Seconds Countdown Timer #

Add a countdown timer with a customizable widget.

General #

Create a countdown timer based on the end time (in seconds) and the start date (DateTime) of the timer. This package does not use DateTime.now, as it may be affected when the platform's date and time are changed by the user. This package is based on https://pub.dev/packages/flutter_countdown_timer.

Installation #

Add the following line to your pubspec.yaml file:

dependencies:
  seconds_countdown_timer: <latest_version>

Usage #

import 'package:seconds_countdown_timer/seconds_countdown_timer.dart';

class MyWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    return Center(
      child: SecondsCountdownTimer(
        endTime: 60,
        startDate: DateTime.now(),
        widgetBuilder: (_, time) {
          return Text("${time?.hours ?? 0} : ${time?.min ?? 0} : ${time?.sec ?? 0}");
        },
      ),
    );
  }
}
5
likes
160
points
58
downloads

Publisher

unverified uploader

Weekly Downloads

package that provide countdown timer with customized widget.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on seconds_countdown_timer