搜尋套件、儲存庫與 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

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。