addStateInfo function
Useful utility for nesting match states.
Implementation
void addStateInfo(Map matchState, Map values) {
var innerState = Map.of(matchState);
matchState.clear();
matchState['state'] = innerState;
matchState.addAll(values);
}