format method

void format(
  1. StringSink sink,
  2. StateTreeFormatter formatter
)

Writes a textual description of the state stree to the sink. The specific output format is controlled by the type of the formatter.

void formatDOT(StateTreeBuilder treeBuilder) {
  var sink = StringBuffer();
  // Write the state tree Graphviz DOT format.
  treeBuilder.format(sink, DotFormatter());
}

Implementation

void format(StringSink sink, StateTreeFormatter formatter) {
  _validate();
  formatter.formatTo(this, sink);
}