SeatingComponent constructor
SeatingComponent({
- required int seats,
Throws ArgumentError (not an assert: a release build must refuse
too) when seats is below 1.
Implementation
SeatingComponent({required this.seats}) {
if (seats < 1) {
throw ArgumentError.value(seats, 'seats', 'must be at least 1');
}
}