seatSelectionControllerProvider top-level property
- @ProviderFor.new(SeatSelectionController)
Owns the set of locally selected seat ids for a given seat map and enforces its selection rules on every mutation.
This controller is local-only: it does not call any API, place holds, or
perform booking — it just tracks "which seats has the current user picked"
and whether each pick is allowed. It is keyed by the seat map passed to
build, so each map gets its own independent selection state.
Adjacency rule
When a map's selection rules require adjacency, a seat may be added to a non-empty selection only if it is adjacent to at least one already-selected seat. Two seats are considered adjacent when:
- They lie in the same row, defined as having an exactly equal seat
position
y; and - They are immediate neighbors along that row — when every seat sharing
that
yis sorted by positionx, no other seat'sxfalls strictly between theirs.
This makes adjacency a property of the seat layout rather than a fixed
pixel distance, so it works regardless of the map's scale or spacing.
Hosts that want row-based adjacency should give every seat in the same row
an identical y value.
Implementation
@ProviderFor(SeatSelectionController)
final seatSelectionControllerProvider = SeatSelectionControllerFamily._();