ShapeLibrary constructor
ShapeLibrary({
- required String id,
- required String name,
- required Iterable<
ShapeDefinition> shapes,
Implementation
ShapeLibrary({
required this.id,
required this.name,
required Iterable<ShapeDefinition> shapes,
}) : shapes = List.unmodifiable(shapes) {
if (id.trim().isEmpty || name.trim().isEmpty) {
throw ArgumentError('Library id and name must not be empty');
}
_validatedDefinitions(this.shapes);
}