FLUTTER ECOSYSTEM

youngchan1988/flow_graph

Flutter 上的流程圖視圖

flow_graph 專案封面
Stars
38
Forks
14
最近推送(UTC)
2023年9月26日
專案狀態
未封存
Chan Young GitHub avatar
GITHUB User

Chan Young ↗

Shanghai NEW CORE Technology Co. Ltd.Shanghai官方網站 ↗
語言DartC++CMakeHTMLCSwiftKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 6 項

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

https://tva1.sinaimg.cn/large/008i3skNgy1gz2lx8ljszj30qs0atdfy.jpg

Features

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

Getting started

dependencies:
    flow_graph: ^0.0.9

Screen shot

https://tva1.sinaimg.cn/large/008i3skNgy1gz2tlptkq9j31050u0ta0.jpg

https://tva1.sinaimg.cn/large/008i3skNgy1gz2tpst6n1g30qo0f0wmy.gif

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