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. bool engineThinking = false,
  14. bool showCoordinatesZone = true,
  15. BoardArrow? lastMoveToHighlight,
  16. bool highlightLastMoveSquares = false,
  17. bool? showPossibleMoves,
  18. bool isInteractive = true,
  19. String nonInteractiveText = 'VIEWING HISTORY',
  20. TextStyle? nonInteractiveTextStyle,
  21. Color? nonInteractiveOverlayColor,
  22. Widget normalMoveIndicatorBuilder(
    1. double cellSize
    )?,
  23. Widget captureMoveIndicatorBuilder(
    1. double cellSize
    )?,
})

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.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,
});