Skip to content

Commit 6c20424

Browse files
Version 0.0.1 Released
0 parents  commit 6c20424

10 files changed

+711
-0
lines changed

.gitignore

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
**/doc/api/
25+
.dart_tool/
26+
.flutter-plugins
27+
.flutter-plugins-dependencies
28+
.packages
29+
.pub-cache/
30+
.pub/
31+
build/
32+
33+
# Android related
34+
**/android/**/gradle-wrapper.jar
35+
**/android/.gradle
36+
**/android/captures/
37+
**/android/gradlew
38+
**/android/gradlew.bat
39+
**/android/local.properties
40+
**/android/**/GeneratedPluginRegistrant.java
41+
42+
# iOS/XCode related
43+
**/ios/**/*.mode1v3
44+
**/ios/**/*.mode2v3
45+
**/ios/**/*.moved-aside
46+
**/ios/**/*.pbxuser
47+
**/ios/**/*.perspectivev3
48+
**/ios/**/*sync/
49+
**/ios/**/.sconsign.dblite
50+
**/ios/**/.tags*
51+
**/ios/**/.vagrant/
52+
**/ios/**/DerivedData/
53+
**/ios/**/Icon?
54+
**/ios/**/Pods/
55+
**/ios/**/.symlinks/
56+
**/ios/**/profile
57+
**/ios/**/xcuserdata
58+
**/ios/.generated/
59+
**/ios/Flutter/App.framework
60+
**/ios/Flutter/Flutter.framework
61+
**/ios/Flutter/Flutter.podspec
62+
**/ios/Flutter/Generated.xcconfig
63+
**/ios/Flutter/app.flx
64+
**/ios/Flutter/app.zip
65+
**/ios/Flutter/flutter_assets/
66+
**/ios/Flutter/flutter_export_environment.sh
67+
**/ios/ServiceDefinitions.json
68+
**/ios/Runner/GeneratedPluginRegistrant.*
69+
70+
# Exceptions to above rules.
71+
!**/ios/**/default.mode1v3
72+
!**/ios/**/default.mode2v3
73+
!**/ios/**/default.pbxuser
74+
!**/ios/**/default.perspectivev3
75+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

.metadata

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: 0b8abb4724aa590dd0f429683339b1e045a1594d
8+
channel: stable
9+
10+
project_type: package

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## [0.0.1] - Apr 28 2020.
2+
3+
* TODO: Initial release.

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Muhammad Usama Siddiqui
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Circular Countdown Timer
2+
3+
Make an animated countdown timer using Circular Countdown Timer.
4+
5+
# Getting Started
6+
7+
To use this plugin, add `circular_countdown_timer` as a [dependency in your pubspec.yaml file.](https://flutter.dev/docs/development/packages-and-plugins/using-packages)
8+
9+
# Example
10+
11+
```dart
12+
import 'package:flutter/material.dart';
13+
import 'package:circular_countdown_timer/circular_countdown_timer.dart';
14+
15+
void main() => runApp(MyApp());
16+
17+
class MyApp extends StatelessWidget {
18+
@override
19+
Widget build(BuildContext context) {
20+
return MaterialApp(
21+
debugShowCheckedModeBanner: false,
22+
title: 'Circular Countdown Timer Demo',
23+
theme: ThemeData(
24+
primarySwatch: Colors.blue,
25+
),
26+
home: MyHomePage(title: 'Circular Countdown Timer'),
27+
);
28+
}
29+
}
30+
31+
class MyHomePage extends StatefulWidget {
32+
MyHomePage({Key key, this.title}) : super(key: key);
33+
34+
final String title;
35+
36+
@override
37+
_MyHomePageState createState() => _MyHomePageState();
38+
}
39+
40+
class _MyHomePageState extends State<MyHomePage> {
41+
@override
42+
Widget build(BuildContext context) {
43+
return Scaffold(
44+
appBar: AppBar(
45+
title: Text(widget.title),
46+
),
47+
body: Center(
48+
child: CircularCountDownTimer(
49+
// Countdown duration in Seconds
50+
duration: 10,
51+
52+
// Width of the Countdown Widget
53+
width: MediaQuery.of(context).size.width / 2,
54+
55+
// Height of the Countdown Widget
56+
height: MediaQuery.of(context).size.height / 2,
57+
58+
// Default Color for Countdown Timer
59+
color: Colors.white,
60+
61+
// Filling Color for Countdown Timer
62+
fillColor: Colors.red,
63+
64+
// Border Thickness of the Countdown Circle
65+
strokeWidth: 5.0,
66+
67+
// Text Style for Countdown Text
68+
countdownTextStyle: TextStyle(
69+
fontSize: 22.0,
70+
color: Colors.black87,
71+
fontWeight: FontWeight.bold),
72+
73+
// Count Order i.e forward or reverse, true for reverse and false for forward order
74+
reverseOrder: false,
75+
76+
// Function which will execute when the Countdown Ends
77+
onCountDownComplete: () {
78+
// Here, do whatever you want
79+
print('Countdown Ended');
80+
},
81+
)));
82+
}
83+
}
84+
```
85+
86+
# Output
87+
88+
![countdown](https://user-images.githubusercontent.com/30389103/80465499-a2371b00-8954-11ea-894a-a11bd97b177b.png)

example/example.dart

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:circular_countdown_timer/circular_countdown_timer.dart';
3+
4+
void main() => runApp(MyApp());
5+
6+
class MyApp extends StatelessWidget {
7+
@override
8+
Widget build(BuildContext context) {
9+
return MaterialApp(
10+
debugShowCheckedModeBanner: false,
11+
title: 'Circular Countdown Timer Demo',
12+
theme: ThemeData(
13+
primarySwatch: Colors.blue,
14+
),
15+
home: MyHomePage(title: 'Circular Countdown Timer'),
16+
);
17+
}
18+
}
19+
20+
class MyHomePage extends StatefulWidget {
21+
MyHomePage({Key key, this.title}) : super(key: key);
22+
23+
final String title;
24+
25+
@override
26+
_MyHomePageState createState() => _MyHomePageState();
27+
}
28+
29+
class _MyHomePageState extends State<MyHomePage> {
30+
@override
31+
Widget build(BuildContext context) {
32+
return Scaffold(
33+
appBar: AppBar(
34+
title: Text(widget.title),
35+
),
36+
body: Center(
37+
child: CircularCountDownTimer(
38+
// Countdown duration in Seconds
39+
duration: 10,
40+
41+
// Width of the Countdown Widget
42+
width: MediaQuery.of(context).size.width / 2,
43+
44+
// Height of the Countdown Widget
45+
height: MediaQuery.of(context).size.height / 2,
46+
47+
// Default Color for Countdown Timer
48+
color: Colors.white,
49+
50+
// Filling Color for Countdown Timer
51+
fillColor: Colors.red,
52+
53+
// Border Thickness of the Countdown Circle
54+
strokeWidth: 5.0,
55+
56+
// Text Style for Countdown Text
57+
countdownTextStyle: TextStyle(
58+
fontSize: 22.0,
59+
color: Colors.black87,
60+
fontWeight: FontWeight.bold),
61+
62+
// Count Order i.e forward or reverse, true for reverse and false for forward order
63+
reverseOrder: false,
64+
65+
// Function which will execute when the Countdown Ends
66+
onCountDownComplete: () {
67+
// Here, do whatever you want
68+
print('Countdown Ended');
69+
},
70+
)));
71+
}
72+
}

0 commit comments

Comments
 (0)