graph_dot 1.0.1 copy "graph_dot: ^1.0.1" to clipboard
graph_dot: ^1.0.1 copied to clipboard

Library for creating Graphviz graphs in the dot language.

example/example.dart

import 'dart:io';

import 'package:graph_dot/graph_dot.dart';

void main() {
  var graph = Graph();

  graph.setNode('A', label: 'Node 1');
  graph.setNode('B', label: 'B');
  graph.setNode('C', label: 'C');

  graph.setEdge('A', 'B');
  graph.setEdge('B', 'C', label: 'Edge');
  graph.setEdge('C', 'A', label: 'POP');

  File newFile = File("./test.dot");

  newFile.writeAsStringSync(graph.toDot());

  Process.runSync("dot", ["-Tpng", "test.dot", "-o", "test.png"]);
}
1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Library for creating Graphviz graphs in the dot language.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on graph_dot