Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dizoftteam/simple_count_down
Simple countdown (timer) for Flutter
https://github.com/dizoftteam/simple_count_down
dart flutter
Last synced: 3 months ago
JSON representation
Simple countdown (timer) for Flutter
- Host: GitHub
- URL: https://github.com/dizoftteam/simple_count_down
- Owner: DizoftTeam
- License: mit
- Created: 2019-12-17T19:55:05.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-05T22:41:21.000Z (over 1 year ago)
- Last Synced: 2024-06-18T23:12:23.692Z (7 months ago)
- Topics: dart, flutter
- Language: Dart
- Homepage: https://pub.dev/packages/timer_count_down
- Size: 2.26 MB
- Stars: 55
- Watchers: 4
- Forks: 25
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Count Down
[![pub](https://img.shields.io/pub/v/timer_count_down?logo=dart)](https://pub.dev/packages/timer_count_down)
![](https://badges.fyi/github/latest-tag/DizoftTeam/simple_count_down)
![](https://badges.fyi/github/stars/DizoftTeam/simple_count_down)
![](https://badges.fyi/github/license/DizoftTeam/simple_count_down)A highly customizable countdown widget for [Flutter](https://flutter.dev/), with support for custom styling, intervals, and onFinished callbacks.
## Preview
## Installing
* Add the latest version of the package to your [pubspec.yaml](https://github.com/DizoftTeam/simple_count_down/blob/master/example/pubspec.yaml) file in the dependency section.
```yaml
dependencies:
flutter:
sdk: fluttertimer_count_down: ^2.2.2
```
Run this in your terminal or click on `pub get````sh
$ flutter pub get
```## How to use
Simple example for the usage of the package is shown below.
```dart
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Countdown(
seconds: 20,
build: (BuildContext context, double time) => Text(time.toString()),
interval: Duration(milliseconds: 100),
onFinished: () {
print('Timer is done!');
},
);
}
}
```
## ExampleFor pause, restart and resume you need to use `CountdownController`.
For an example of using the package, please check the [example](./example) folder. Otherwise, keep reading and keep going!