FLUTTER ECOSYSTEM

AndresR173/countdown_progress_indicator

Flutter용 사용자 정의 가능한 카운트다운 타이머

카운트다운 프로그레스 인디케이터 프로젝트 이미지
Stars
13
Forks
8
최근 푸시(UTC)
2024. 7. 14.
프로젝트 상태
활성
Andres Rojas GitHub avatar
GITHUB User

Andres Rojas ↗

iOS developer, Open Source lover

Medellín, Colombia공식 웹사이트 ↗
언어DartSwiftKotlinObjective-C

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • flutter_lints개발 의존성^4.0.0

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Countdown Progress Indicator

https://badges.fyi/github/latest-tag/AndresR173/countdown_progress_indicator https://badges.fyi/github/stars/AndresR173/countdown_progress_indicator https://badges.fyi/github/license/AndresR173/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.3

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