Coder Social home page Coder Social logo

rahul7f / countdown_progress_indicator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andresr173/countdown_progress_indicator

1.0 0.0 0.0 1.48 MB

Customizable countdown timer for Flutter

License: MIT License

Objective-C 0.35% Kotlin 1.14% Dart 94.79% Swift 3.72%

countdown_progress_indicator's Introduction

Countdown Progress Indicator

Customizable countdown timer for Flutter

Getting Started

To use this package, add countdown_progress_indicador as a dependency in your pubspec.yaml file.

dependencies:
	...
	countdown_progress_indicador: ^0.1.2

How to use

In your project add the following import:

import  'package:countdown_progress_indicator/countdown_progress_indicator.dart';

This widget starts the countdown automatically by default and supports pause and resume actions. If you want to support these actions, implement a CountdownController as the example above:

SizedBox(
	height:  200,
	width:  200,
	child:  CountDownProgressIndicator(
		controller: _controller,
		valueColor:  Colors.red,
		backgroundColor:  Colors.blue,
		initialPosition:  0,
		duration:  20,
		text:  'SEC',
		onComplete: () =>  null,
	),
),

Custom Formatter

If you want to show a text different than the time in seconds, you can implement a custom time formatter.

CountDownProgressIndicator(
	controller: _controller,
	valueColor: Colors.red,
	backgroundColor: Colors.blue,
	initialPosition: 0,
	duration: 365,
	timeFormatter: (seconds) {
		return Duration(seconds: seconds)
			.toString()
			.split('.')[0]
			.padLeft(8, '0');
	},
	text: 'hh:mm:ss',
	onComplete: () => null,
),

Countdown

countdown

countdown_progress_indicator's People

Contributors

andresr173 avatar rahul7f avatar

Stargazers

Dhruv Rana avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.