搜索插件、代码仓与 APP 分类

countdown_progress_indicator 封面
插件详情v0.1.3

countdown_progress_indicator

可自定义的 Flutter 倒计时计时器,带有暂停/恢复控制。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
220
喜欢数
43
Pub 分数
160

安装插件

flutter pub add countdown_progress_indicator

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个可自定义的倒计时计时器小部件,适用于 Flutter,支持暂停和恢复功能。它提供了一个视觉上吸引人的进度指示器来显示剩余时间,非常适合用于限时任务、测验或专注会话。该包轻量且能无缝集成到跨多个平台的 Flutter 应用中。开发者可以轻松调整颜色、大小和动画样式,以匹配其应用的设计。本着简单和灵活的理念构建,它在时间敏感的交互中提升了用户体验。

适合场景

  • 定时测验
  • 焦点计时器
  • 任务倒计时
  • 事件倒计时
  • 互动式学习应用

主要特点

  • 暂停和恢复控制
  • 可自定义外观
  • 跨平台支持
  • 流畅的动画
  • 可配置的持续时间
  • 实时进度更新

适合对象

  • 教育类应用
  • 生产力工具
  • 游戏化体验
  • 限时挑战
  • 以UI为主的应用程序

使用建议

  • 需要手动处理计时器状态
  • 有限的内置通知
  • 无自动重置功能
  • 最适合简单的倒计时逻辑
  • 复杂工作流可能需要额外的状态管理

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

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

所属分类

源码仓库

使用此插件的项目

暂无相关数据。