addStateInfo function

void addStateInfo (Map matchState, Map values)

Useful utility for nesting match states.

Implementation

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