graph_display 0.1.1 copy "graph_display: ^0.1.1" to clipboard
graph_display: ^0.1.1 copied to clipboard

A package providing widgets for displaying graph structures in Flutter.

graph_display #

https://pub.dev/packages/graph_display

pub package

This package exposes widgets for displaying graphs in Flutter in a customisable way.

If you are not using Flutter, or you require a more specific graph widget, use graph_layout instead to generate graph layouts, and write your own code for displaying these on the screen.

Example usage #

Construct the graph you wish to visualise.

// create a `Graph` object
// this particular one is the graph from the NetworkX home page https://networkx.org/
final edgeList = '''0 1
0 2
0 3
1 2
1 3
2 3
3 4
4 5
5 6
6 7
7 8
7 9
7 10
8 9
8 10
9 10''';
final graph = Graph.fromEdgeListString(edgeList);

You can then display this graph as a widget! The graph can either be interactive, allowing the users of your app to drag the nodes around to explore the graph, or static, requiring no computation once the graph layout has been generated.

InteractiveGraph(
  layoutAlgorithm: Eades(graph: graph),
);
StaticGraph(
  layoutAlgorithm: FruchtermanReingold(graph: graph),
)

Demo #

https://cicadacinema.github.io/graphs/

1
likes
150
points
36
downloads
screenshot

Publisher

verified publisherarseny.uk

Weekly Downloads

A package providing widgets for displaying graph structures in Flutter.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

async, flutter, graph_layout, vector_math

More

Packages that depend on graph_display