Chessboard constructor
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 [],
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,
);