copyWith method

DeckLayout copyWith({
  1. String? name,
  2. int? deckIndex,
  3. List<List<Seat?>>? matrix,
  4. DriverPosition? driverPosition,
  5. int? doorRowIndex,
})

Copies this DeckLayout with updated values.

Implementation

DeckLayout copyWith({
  String? name,
  int? deckIndex,
  List<List<Seat?>>? matrix,
  DriverPosition? driverPosition,
  int? doorRowIndex,
}) {
  return DeckLayout(
    name: name ?? this.name,
    deckIndex: deckIndex ?? this.deckIndex,
    matrix: matrix ?? this.matrix,
    driverPosition: driverPosition ?? this.driverPosition,
    doorRowIndex: doorRowIndex ?? this.doorRowIndex,
  );
}