build method
Builds the Graph.
Throws a StateError if no initial state was set.
Implementation
Graph<STATE, EVENT, SIDE_EFFECT> build() {
final initialState = _initialState;
if (initialState == null) {
throw StateError('initialState must be set before building the graph');
}
return Graph(initialState, _finishStates, _stateDefinitions, _onTransitionListeners);
}