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

flow_graph 封面
套件詳情v0.0.9

flow_graph

Flutter 中的 DAG 圖

近 30 天下載
42
喜歡數
20
Pub 分數
40

安裝套件

flutter pub add flow_graph

套件介紹

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

Flow Graph 是一個用於在應用程式中可視化有向無環圖(DAG)的 Flutter 套件。它讓開發者能夠建立互動式、可自訂的節點與邊線圖表,非常適合工作流程、資料流程或相依性樹狀結構。此套件支援動態更新、拖曳與放置功能,以及響應式佈局,適用於簡單至複雜的圖形表示。以 Dart 為基礎建構,能順暢整合至 Flutter 專案,並利用框架的繪製能力實現流暢效能。其輕量設計專注於清晰度與易用性,不需額外外部相依。

適用情境

  • 可視化資料處理管道
  • 在工作流中顯示任務依賴關係
  • 在應用程式中建立互動式流程圖
  • 映射應用程式狀態轉換
  • 設計基於圖表的使用者介面

主要特色

  • 支援有向無環圖結構可視化
  • 互動式節點操作
  • 可自訂的節點和邊樣式
  • 響應式版面調整
  • 輕量且原生 Flutter

適合對象

  • 開發工作流程工具的開發者
  • UI設計師需要圖表元件
  • 具有依賴項追蹤的應用程式
  • 具有視覺邏輯的教育應用程式
  • 數據流可視化儀表板

使用建議

  • 僅限有向無環圖(無循環)
  • 無內建匯出功能
  • 需要手動處理複雜的互動
  • 最適合中等規模的圖
  • 除了 GitHub 範例外,沒有官方文件

原始 README

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

Features

  • Support draggable node;
  • Support delete node & edge;
  • Support horizontal & vertical layout;

Getting started

dependencies:
    flow_graph: ^0.0.9

Screen shot

Usage

Flow graph:

FlowGraphView(
	root: root,
	direction: _direction,
	centerLayout: _centerLayout,
	builder: (context, node) {
		return Container(
		color: Colors.white60,
		padding: const EdgeInsets.all(16),
		child: Text(
			node.data.toString(),
			style: const TextStyle(color: Colors.black87, fontSize: 16),
		),
		);
	},
)

Draggable flow graph:

DraggableFlowGraphView<FamilyNode>(
	root: root,
	direction: _direction,
	centerLayout: _centerLayout,
	willConnect: (node) => true,
	willAccept: (node) => true,
	builder: (context, node) {
	return Container(
		color: Colors.white60,
		padding: const EdgeInsets.all(16),
		child: Text(
			(node.data as FamilyNode).name,
			style: const TextStyle(color: Colors.black87, fontSize: 16),
			),
		);
	},
	nodeSecondaryMenuItems: (node) {
		return [
			PopupMenuItem(
			child: Text('Delete'),
			onTap: () {
				setter(() {
					node.deleteSelf();
				});
			},
			)
		];
	},
)

License

See LICENSE

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。