copyWith method

ChessBoardStyle copyWith({
  1. Widget getPieceWidget(
    1. ChessPiece
    )?,
  2. Widget getSquareWidget(
    1. bool dark,
    2. Point<int>,
    3. Set<ChessSquareRenderingDetails> details
    )?,
  3. Widget getPossibleCaptureDecor(
    1. Point<int>
    )?,
  4. Widget getPossibleMoveDecor(
    1. Point<int>
    )?,
  5. Widget getKingInCheckDecor(
    1. Point<int>
    )?,
  6. TextStyle? whiteSquareTextStyle,
  7. TextStyle? blackSquareTextStyle,
  8. bool? showRankAndFileLabels,
})

Implementation

ChessBoardStyle copyWith({
  Widget Function(ChessPiece)? getPieceWidget,
  Widget Function(
          bool dark, Point<int>, Set<ChessSquareRenderingDetails> details)?
      getSquareWidget,
  Widget Function(Point<int>)? getPossibleCaptureDecor,
  Widget Function(Point<int>)? getPossibleMoveDecor,
  Widget Function(Point<int>)? getKingInCheckDecor,
  TextStyle? whiteSquareTextStyle,
  TextStyle? blackSquareTextStyle,
  bool? showRankAndFileLabels,
}) {
  return ChessBoardStyle(
      getPieceWidget: getPieceWidget ?? this.getPieceWidget,
      getSquareWidget: getSquareWidget ?? this.getSquareWidget,
      getPossibleCaptureDecor:
          getPossibleCaptureDecor ?? this.getPossibleCaptureDecor,
      getPossibleMoveDecor: getPossibleMoveDecor ?? this.getPossibleMoveDecor,
      getKingInCheckDecor: getKingInCheckDecor ?? this.getKingInCheckDecor,
      whiteSquareTextStyle: whiteSquareTextStyle ?? this.whiteSquareTextStyle,
      blackSquareTextStyle: blackSquareTextStyle ?? this.blackSquareTextStyle,
      showRankAndFileLabels:
          showRankAndFileLabels ?? this.showRankAndFileLabels);
}