addStateInfo function

void addStateInfo (Map matchState, Map values)

Useful utility for nesting match states.

Implementation

void addStateInfo(Map matchState, Map values) {
  var innerState = new Map.from(matchState);
  matchState.clear();
  matchState['state'] = innerState;
  matchState.addAll(values);
}