CockpitRebuildFrame constructor
CockpitRebuildFrame({
- required int frameNumber,
- Iterable<
CockpitRebuildCount> entries = const <CockpitRebuildCount>[],
Implementation
CockpitRebuildFrame({
required this.frameNumber,
Iterable<CockpitRebuildCount> entries = const <CockpitRebuildCount>[],
}) : entries = List<CockpitRebuildCount>.unmodifiable(entries) {
if (frameNumber < 0 || this.entries.length > 2000) {
throw const FormatException('Rebuild frame bounds are invalid.');
}
if (this.entries.any((entry) => entry.locationId < 0 || entry.count <= 0)) {
throw const FormatException('Rebuild entries are invalid.');
}
}