Search packages, repositories and app categories

GitHub repositoryyoungchan1988/flow_graph

flow_graph

Flow graph view on flutter

flow_graph project cover
Stars
38
Forks
14
Last push (UTC)
Sep 26, 2023
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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

Chan Young GitHub avatar
GitHub author

Chan Young ↗

Shanghai NEW CORE Technology Co. Ltd.ShanghaiOfficial website ↗
LanguagesDartC++CMakeHTMLCSwiftKotlinObjective-C

Packages published by this repository

Dependencies used

Dependency list 6 items

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗