SimpleChessBoard constructor

const SimpleChessBoard({
  1. Key? key,
  2. required String fen,
  3. bool blackSideAtBottom = false,
  4. required PlayerType whitePlayerType,
  5. required PlayerType blackPlayerType,
  6. required void onMove({
    1. required ShortMove move,
    }),
  7. void onMoveComplete({
    1. required ShortMove move,
    2. required String newFen,
    })?,
  8. required Future<PieceType?> onPromote(),
  9. required void onPromotionCommited({
    1. required ShortMove moveDone,
    2. required PieceType pieceType,
    }),
  10. required void onTap({
    1. required String cellCoordinate,
    }),
  11. required ChessBoardColors chessBoardColors,
  12. required Map<String, Color> cellHighlights,
  13. List<BoardArrow> highlightingArrows = const [],
  14. bool engineThinking = false,
  15. bool showCoordinatesZone = true,
  16. BoardArrow? lastMoveToHighlight,
  17. bool highlightLastMoveSquares = false,
  18. bool? showPossibleMoves,
  19. bool isInteractive = true,
  20. String nonInteractiveText = 'VIEWING HISTORY',
  21. TextStyle? nonInteractiveTextStyle,
  22. Color? nonInteractiveOverlayColor,
  23. Widget normalMoveIndicatorBuilder(
    1. double cellSize
    )?,
  24. Widget captureMoveIndicatorBuilder(
    1. double cellSize
    )?,
  25. bool playSounds = false,
  26. void onCapturedPiecesChanged({
    1. required List<PieceType> blackCapturedPieces,
    2. required List<PieceType> whiteCapturedPieces,
    })?,
  27. void onBoardResized(
    1. double newCellSize
    )?,
})

Constructor.

Implementation

const SimpleChessBoard({
  super.key,
  required this.fen,
  this.blackSideAtBottom = false,
  required this.whitePlayerType,
  required this.blackPlayerType,
  required this.onMove,
  this.onMoveComplete,
  required this.onPromote,
  required this.onPromotionCommited,
  required this.onTap,
  required this.chessBoardColors,
  required this.cellHighlights,
  this.highlightingArrows = const [],
  this.engineThinking = false,
  this.showCoordinatesZone = true,
  this.lastMoveToHighlight,
  this.highlightLastMoveSquares = false,
  this.showPossibleMoves,
  this.isInteractive = true,
  this.nonInteractiveText = 'VIEWING HISTORY',
  this.nonInteractiveTextStyle,
  this.nonInteractiveOverlayColor,
  this.normalMoveIndicatorBuilder,
  this.captureMoveIndicatorBuilder,
  this.playSounds = false,
  this.onCapturedPiecesChanged,
  this.onBoardResized,
});