搜尋分類、套件與程式碼儲存庫

activity_ring 封面
套件詳情v0.3.0

activity_ring

用於創建蘋果手錶風格環形進度條的 Flutter 庫。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1810
喜歡數
31
Pub 分數
140

安裝套件

flutter pub add activity_ring

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 庫,可讓開發者建立類似 Apple Watch 的圓形進度環。這些視覺效果出色的動畫環以緊湊且直覺的方式顯示進度,非常適合追蹤目標、時間或完成百分比。此套件支援 Android、iOS、Web、macOS、Windows 及 Linux 多個平台,確保跨裝置的一致性使用者介面。提供可自訂的顏色、線條寬度與動畫效果,以符合應用程式主題。非常適合健身應用、儀表板或任何需要優雅進度視覺化的應用。

適用情境

  • 健身追蹤應用程式
  • 儀表板小部件
  • 目標完成指示器
  • 基於時間的進度顯示
  • 互動式 UI 元素

主要特色

  • Apple Watch 風格的圓形進度環
  • 可自定義的顏色和筆畫寬度
  • 平滑動畫
  • 跨平台支援
  • 簡單 API 結合
  • 響應式設計

適合對象

  • 開發健身或健康類應用的開發者
  • 尋求現代 UI 元件的設計師
  • 需要視覺進度回饋的應用程式
  • 跨平台應用
  • 目標導向介面的專案

使用建議

  • 需要理解 Flutter 的繪圖和動畫系統
  • 可能需要在低階設備上進行效能調校
  • 僅限圓形進度可視化
  • 不適合複雜的資料視覺化

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Activity Rings

pub package

Library to create Progress bars in Apple Watch style rings - Apple Watch Rings

To use, import package:activity_ring/activity_ring.dart.

This library is built with to be extremely customizable with low effort. Please check the API documentation if you get stuck anywhere.

Note: Do not let the auto brighten colors to exceed 3 rings as this will cause a runtime exception.

Example

There are several ways to create rings.

Using a single color
Ring(
  percent: 90,
  color: RingColorScheme(ringColor: Colors.red),
  radius: 80,
  width: 10,
  child: Center(child: Text('90%')),
)

RingColor

The above ring is automatically painted with gradients. To have a constant color just pass gradient: false to RingColorScheme.

Using a single gradient
Ring(
  percent: 90,
  color: RingColorScheme(ringGradient: [Colors.red, Colors.blue]),
  radius: 80,
  width: 10,
  child: Center(child: Text('90%')),
),

RingGradient

The above ring is automatically painted with gradient from colors given.

Using same color for a ring with different color for each ring
Ring(
  percent: 190,
  color: RingColorScheme(ringColors: [Colors.red, Colors.blue]),
  radius: 80,
  width: 10,
  child: Center(child: Text('190%')),
),

RingColors

The above ring is automatically painted with gradient from colors given, where each color in list represents that ring's color. To have a constant color just pass gradient: false to RingColorScheme.

Explicitly mentioning gradinet for each ring
Ring(
  percent: 190,
  color: RingColorScheme(ringGradients: [[Colors.red, Colors.yellow], [Colors.yellow, Colors.green]]),
  radius: 80,
  width: 10,
  child: Center(child: Text('190%')),
),

RingGradients

The above ring is automatically painted with gradient from colors given, where each color in list represents that ring's color. To have a constant color just pass gradient: false to RingColorScheme.

TODO

  • [ ] Create templates for apple colors
  • [ ] Add tests and coverage

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。