copyWith method

SquareModel copyWith({
  1. required Piece? squareState,
})

Implementation

SquareModel copyWith({required Piece? squareState}) {
  return SquareModel(
    squarePiece: squareState,
    squareName: this.squareName,
  );
}