DeckLayout class

Represents a single deck/floor within a bus layout.

Annotations

Constructors

DeckLayout({required String name, required List<List<Seat?>> matrix, int deckIndex = 0, DriverPosition driverPosition = DriverPosition.left, int? doorRowIndex})
Creates a DeckLayout.
const

Properties

columnCount → int
Total number of columns in this deck.
no setter
deckIndex → int
Index of the deck (0 for lower/main deck, 1 for upper deck).
final
doorRowIndex → int?
Row index where an entrance/exit door is situated, if any.
final
driverPosition → DriverPosition
Driver cabin location for this deck.
final
hashCode → int
The hash code for this object.
no setterinherited
matrix → List<List<Seat?>>
2D grid matrix of seats for this deck. Elements can be null for aisles/empty spots.
final
name → String
Name or label for this deck (e.g. "Lower Deck", "Upper Deck", "Main Cabin").
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
rowCount → int
Total number of rows in this deck.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
seatCount → int
Total number of valid seats.
no setter
seats → List<Seat>
Flattened list of all valid (non-null) seats in this deck.
no setter
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

copyWith({String? name, int? deckIndex, List<List<Seat?>>? matrix, DriverPosition? driverPosition, int? doorRowIndex}) → DeckLayout
Copies this DeckLayout with updated values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
seatAt(int row, int column) → Seat?
Retrieves the seat at the specified row and column, or null if empty/aisle.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited