toDot method

String toDot()

Implementation

String toDot() {
  String res = "digraph $name {";

  _nodes.forEach((key, value) {
    res += '\n    $key [label="$value"]';
  });

  _edges.forEach((elem) {
    res += '\n    ${elem.a} -> ${elem.b} [label="${elem.label}"]';
  });

  res += "\n}";
  return res;
}