SeatingComponent class
How many people a servable symbol seats (spec 14 S1, R-1, R-2).
A new component type, not a field on SymbolComponent: an older
build preserves an unknown component type verbatim and would drop an
unknown field (spec 14 F-5), so adding it needs no schema bump.
Immutable and value-equal; toJson has one fixed key. Not a parametric type: it generates nothing.
Constructors
- SeatingComponent({required int seats})
-
Throws ArgumentError (not an
assert: a release build must refuse too) whenseatsis below 1.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
Map< String, Object?> json) → SeatingComponent -
Throws FormatException when
seatsis missing or not an integer, and ArgumentError when it is below 1. -
register(
ComponentRegistry registry) → void -
Registers the type. Once per registry:
registerreplaces the store for the type, so a second call drops every live seating component.
Constants
- componentTypeId → const String