Board constructor

Board({
  1. required String fen,
  2. required double size,
  3. required BoardColor orientation,
  4. required Color lightSquareColor,
  5. required Color darkSquareColor,
  6. required ChessBoardColors boardColors,
  7. required Moved onMove,
  8. required Promoted onPromote,
  9. required PromotionCommited onPromotionCommited,
  10. BuildPiece? buildPiece,
  11. BuildSquare? buildSquare,
  12. BuildCustomPiece? buildCustomPiece,
  13. required List<String> lastMove,
  14. 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);