Chessboard constructor

Chessboard({
  1. required String fen,
  2. required double size,
  3. BoardColor orientation = BoardColor.WHITE,
  4. Color lightSquareColor = const Color.fromRGBO(240, 217, 181, 1),
  5. Color darkSquareColor = const Color.fromRGBO(181, 136, 99, 1),
  6. Moved onMove = noop1,
  7. Promoted onPromote = defaultPromoting,
  8. BuildPiece? buildPiece,
  9. BuildSquare? buildSquare,
  10. BuildCustomPiece? buildCustomPiece,
  11. Color lastMoveHighlightColor = const Color.fromRGBO(128, 128, 128, .3),
  12. Color selectionHighlightColor = const Color.fromRGBO(128, 128, 128, .3),
  13. List<String> lastMove = const [],
})

Implementation

Chessboard({
  required String fen,
  required double size,
  BoardColor orientation = BoardColor.WHITE,
  Color lightSquareColor = const Color.fromRGBO(240, 217, 181, 1),
  Color darkSquareColor = const Color.fromRGBO(181, 136, 99, 1),
  Moved onMove = noop1,
  Promoted onPromote = defaultPromoting,
  BuildPiece? buildPiece,
  BuildSquare? buildSquare,
  BuildCustomPiece? buildCustomPiece,
  Color lastMoveHighlightColor = const Color.fromRGBO(128, 128, 128, .3),
  Color selectionHighlightColor = const Color.fromRGBO(128, 128, 128, .3),
  List<String> lastMove = const [],
}) : board = Board(
        fen: fen,
        size: size,
        orientation: orientation,
        onMove: onMove,
        lightSquareColor: lightSquareColor,
        darkSquareColor: darkSquareColor,
        onPromote: onPromote,
        buildPiece: buildPiece,
        buildSquare: buildSquare,
        buildCustomPiece: buildCustomPiece,
        lastMove: lastMove,
        lastMoveHighlightColor: lastMoveHighlightColor,
        selectionHighlightColor: selectionHighlightColor,
      );