搜尋套件、儲存庫與 APP 分類

flutter_annual_task 封面
套件詳情v0.2.0

flutter_annual_task

用於顯示類似 GitHub 貢獻(GitHub 日曆)的每日任務網格視圖的 Flutter 套件。

近 30 天下載
63
喜歡數
45
Pub 分數
60

安裝套件

flutter pub add flutter_annual_task

套件介紹

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

一個 Flutter 套件,顯示類似於 GitHub 貢獻日曆的每日任務網格檢視。它以顏色編碼的網格可視化任務完成情況,非常適合追蹤習慣、生產力或專案里程碑。此套件輕量且可自訂,支援各種主題和樣式選項。設計簡潔清晰,可無縫整合至注重個人發展、目標追蹤或資料視覺化的應用程式中。

適用情境

  • 追蹤每日習慣
  • 可視化隨時間變化的生產力
  • 監控項目進度
  • 顯示使用者活動
  • 建立成就儀表板

主要特色

  • GitHub 風格的貢獻網格
  • 可自訂的顏色和主題
  • 與 Flutter 的簡單整合
  • 響應式網格佈局
  • 支援基於日期的任務資料

適合對象

  • 生產力應用
  • 習慣追蹤器
  • 個人開發工具
  • 目標設定應用
  • 健康或健身應用中的數據可視化

使用建議

  • 限於每日任務可視化
  • 無內建資料持久化
  • 需要手動管理任務資料
  • 未針對大型資料集進行優化
  • 無互動功能,例如工具提示或點擊事件

原始 README

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

flutter_annual_task

flutter_annual_task

Flutter package for displaying grid view of daily task like Github-Contributions.

Example example

Usage

Make sure to check out example project.

AnnualTaskView(
  taskItem	// List<AnnualTaskItem>
),

Installation

Add to pubspec.yaml:

dependencies:
  flutter_annual_task: ^0.1.3

Then import it to your project:

import 'package:flutter_annual_task/flutter_annual_task.dart';

And finally add AnnualTaskView widget in your project.

AnnualTaskView(
  taskItem	// List<AnnualTaskItem>
),

AnnualTaskItem

AnnualTaskItem

class AnnualTaskItem {
  final DateTime date;
  final double proceeding;	// 0.0 ~ 1.0

  AnnualTaskItem(this.date, [this.proceeding = 1.0]);
  ...
}

The value of proceeding affects the opacity on the each cell of daily task.
- For showing the color in visual, the minimum value of displaying is 80(max: 255).

AnnualTaskColorItem

If you want to specify color for each daily task, you can use AnnualTaskColorItem.

class AnnualTaskColorItem extends AnnualTaskItem {
  final Color color;

  AnnualTaskColorItem(
    DateTime date, {
    double proceeding = 1.0,
    this.color,
  }) : super(date, proceeding);
  ...
}

You should generate list of AnnualTaskItem(List<AnnualTaskItem>) to use this package.
Below is an example for building list of AnnualTaskItem.

//AnnualTaskItem
<your_item_list>.map(
  (item) => AnnualTaskItem(
    item.date,
    0.5,
  ),
)
.toList();

//AnnualTaskColorItem
<your_item_list>.map(
  (item) => AnnualTaskColorItem(
    item.date,
    color: <color_for_each_item>
  ),
)
.toList();

Examples

Cell Shape

Specify cellShape with AnnualTaskCellShape with AnnualTaskCellShape.ROUNDED_SQUARE(default), AnnualTaskCellShape.SQUARE or AnnualTaskCellShape.CIRCLE.

Square

Image
square
AnnualTaskView(
  taskItem, // List<AnnualTaskItem>
  cellShape: AnnualTaskCellShape.SQUARE,
)

Circle

Image
circle
AnnualTaskView(
  taskItem, // List<AnnualTaskItem>
  cellShape: AnnualTaskCellShape.CIRCLE,
)

AnnualTaskColorItem

Image
circle
AnnualTaskView(
  taskItemWithColor, // List<AnnualTaskColorItem>
)
Labels

You can edit the labels of week or the labels of month.

AnnualTaskView(
  taskItem, // List<AnnualTaskItem>
  showMonthLabel: false, //default : true
  showWeekDayLabel: false, //default : true
)
Image
without labels

Custom label

Image
custom labels
AnnualTaskView(
  taskItem, // List<AnnualTaskItem>
  weekDayLabels: ['', 'Mon', '', 'Wed', '', 'Fri', ''],
  monthLabels: ['1','2','3','4','5','6','7','8','9','10','11','12'],
)

The type of weekDayLabels and monthLabels is List<String>.

  • weekDayLabels starts from Sunday.
  • default value of `weekDayLabels' is ['S', 'M', 'T', 'W', 'T', 'F', 'S'].
  • default value of monthLabels' is ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']`.
  • You can also hide the label of each items with empty String(''). But, weekDayLabels should be length of 7 and, monthLabels should be length of 12.

Styled label

Image
Styled label
AnnualTaskView(
  taskItem, // List<AnnualTaskItem>
  labelStyle: TextStyle(
    color: Colors.blueGrey,
    fontSize: 10,
    fontWeight: FontWeight.bold,
  ),	// default label style : TextStyle(fontSize: 8)
)

Props

props type desc
items List<AnnualTaskItem> List of AnnualTaskItem
year int default : DateTime.now().year
activateColor Color default : Theme.of(context).primaryColor
emptyColor Color Color of cell with proceeding 0.0 or the day which items doesn't contain.
default : Color(0xFFD0D0D0)
showWeekDayLabel bool Show the labels of week, if true.
default : true
cellShape AnnualTaskCellShape Shape of cell. One of AnnualTaskCellShape.ROUNDED_SQUARE, AnnualTaskCellShape.SQUARE or AnnualTaskCellShape.CIRCLE.
default: AnnualTaskCellShape.ROUNDED_SQUARE
showMonthLabel bool Show the labels of month, if true.
default : true
monthLabels List<String> Labels of month.
default: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
weekDayLabels List<String> Labels of week.
default: ['S', 'M', 'T', 'W', 'T', 'F', 'S']
labelStyle TextStyle TextStyle of labels.
default: TextStyle(fontSize: 8)

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。