Last updated:
0 purchases
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
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.