Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Leocardoso94/flutter-countdown
A simple countdown plugin for flutter ⌛
https://github.com/Leocardoso94/flutter-countdown
countdown dart flutter flutter-package flutter-plugin
Last synced: 5 days ago
JSON representation
A simple countdown plugin for flutter ⌛
- Host: GitHub
- URL: https://github.com/Leocardoso94/flutter-countdown
- Owner: Leocardoso94
- License: mit
- Created: 2019-06-02T20:31:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-11T09:36:33.000Z (over 3 years ago)
- Last Synced: 2024-08-01T12:23:39.206Z (3 months ago)
- Topics: countdown, dart, flutter, flutter-package, flutter-plugin
- Language: Dart
- Homepage: https://pub.dev/packages/countdown_flutter
- Size: 117 KB
- Stars: 45
- Watchers: 2
- Forks: 22
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# flutter-countdown
A simple countdown plugin for flutter ⌛
![gif](https://github.com/Leocardoso94/flutter-countdown/blob/master/images/countdown.gif?raw=true)
## Getting Started
This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/developing-packages/),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.### Usage
#### Countdown
```dart
import 'package:flutter/material.dart';
import 'package:countdown_flutter/countdown_flutter.dart';class Foo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: Countdown(
duration: Duration(seconds: 10),
onFinish: () {
print('finished!');
},
builder: (BuildContext ctx, Duration remaining) {
return Text('${remaining.inMinutes}:${remaining.inSeconds}');
},
),
);
}
}```
#### CountdownFormatted
```dart
import 'package:flutter/material.dart';
import 'package:countdown_flutter/countdown_flutter.dart';class Foo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: CountdownFormatted(
duration: Duration(hours: 1),
builder: (BuildContext ctx, String remaining) {
return Text(remaining); // 01:00:00
},
),
);
}
}```