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 Moved onMove,
  7. required Promoted onPromote,
  8. BuildPiece? buildPiece,
  9. BuildSquare? buildSquare,
  10. BuildCustomPiece? buildCustomPiece,
  11. required Color selectionHighlightColor,
  12. required Color lastMoveHighlightColor,
  13. required List<String> lastMove,
})

Implementation

Board({
  required this.fen,
  required this.size,
  required this.orientation,
  required this.lightSquareColor,
  required this.darkSquareColor,
  required Moved onMove,
  required Promoted onPromote,
  BuildPiece? buildPiece,
  BuildSquare? buildSquare,
  BuildCustomPiece? buildCustomPiece,
  required this.selectionHighlightColor,
  required this.lastMoveHighlightColor,
  required this.lastMove,
})  : _onMove = onMove,
      _onPromote = onPromote,
      buildPiece = Option.fromNullable(buildPiece),
      buildSquare = Option.fromNullable(buildSquare),
      buildCustomPiece = Option.fromNullable(buildCustomPiece);