CompositeStateSnapshotParticipant constructor
Creates a composite participant from non-empty child regions.
Implementation
CompositeStateSnapshotParticipant({
required this.path,
required this.schemaKind,
required this.schemaVersion,
required Iterable<StateSnapshotParticipant> children,
this.configurationIdentity = '',
this.dependencies = const [],
}) : children = List.unmodifiable(children) {
if (this.children.isEmpty) {
throw ArgumentError.value(children, 'children', 'Must not be empty.');
}
final paths = <String>{};
for (final child in this.children) {
if (!paths.add(child.path)) {
throw ArgumentError('Duplicate composite child path ${child.path}.');
}
}
}