copyWith method

BoardState copyWith({
  1. List<String>? board,
  2. int? player,
  3. int? orientation,
  4. int? lastFrom,
  5. int? lastTo,
  6. int? checkSquare,
})

Implementation

BoardState copyWith({
  List<String>? board,
  int? player,
  int? orientation,
  int? lastFrom,
  int? lastTo,
  int? checkSquare,
}) {
  return BoardState(
    board: board ?? this.board,
    player: player ?? this.player,
    orientation: orientation ?? this.orientation,
    lastFrom: lastFrom ?? this.lastFrom,
    lastTo: lastTo ?? this.lastTo,
    checkSquare: checkSquare ?? this.checkSquare,
  );
}