flow_graph

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

flow graph

Features #

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

Getting started #
dependencies:
flow_graph: ^0.0.9
copied to clipboard
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),
),
);
},
)
copied to clipboard
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();
});
},
)
];
},
)
copied to clipboard
License #
See LICENSE

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.