Board constructor
Board({
- required String fen,
- required double size,
- required BoardColor orientation,
- required Color lightSquareColor,
- required Color darkSquareColor,
- required ChessBoardColors boardColors,
- required Moved onMove,
- required Promoted onPromote,
- required PromotionCommited onPromotionCommited,
- BuildPiece? buildPiece,
- BuildSquare? buildSquare,
- BuildCustomPiece? buildCustomPiece,
- required List<
String> lastMove, - required List<
BoardArrow> arrows,
Implementation
Board({
required this.fen,
required this.size,
required this.orientation,
required this.lightSquareColor,
required this.darkSquareColor,
required this.boardColors,
required Moved onMove,
required Promoted onPromote,
required PromotionCommited onPromotionCommited,
BuildPiece? buildPiece,
BuildSquare? buildSquare,
BuildCustomPiece? buildCustomPiece,
required this.lastMove,
required this.arrows,
}) : _onMove = onMove,
_onPromote = onPromote,
_onPromotionCommited = onPromotionCommited,
buildPiece = Option.fromNullable(buildPiece),
buildSquare = Option.fromNullable(buildSquare),
buildCustomPiece = Option.fromNullable(buildCustomPiece);