LayoutShape constructor
Creates a shape from positive dimensions.
Implementation
LayoutShape(Iterable<int> dimensions)
: _dimensions = List<int>.unmodifiable(dimensions) {
if (_dimensions.isEmpty) {
throw RohdHclException(
'A layout shape must have at least one dimension.');
}
if (_dimensions.any((dimension) => dimension <= 0)) {
throw RohdHclException('Every layout shape dimension must be positive.');
}
}