GroupingState constructor
Implementation
GroupingState(
super.type,
List<State> states, {
super.result,
}) : states = UnmodifiableListView(states.toList()) {
if (states.isEmpty) {
throw ArgumentError('Must not be empty', 'states');
}
states.first.parent = this;
for (var i = 1; i < states.length; i++) {
final previous = states[i - 1];
final next = states[i - 1];
previous.next = next;
next.previous = previous;
}
}