ChessBoardWidget constructor

ChessBoardWidget({
  1. Key? key,
  2. Player? onTop,
  3. required ChessGameState state,
  4. ChessBoardStyle? style,
  5. List<ChessBoardAnimation>? animations,
  6. List<Arrow>? arrows,
  7. required void onPlayMove(
    1. ChessMove
    )?,
  8. void onAnimationsCompleted()?,
})

Implementation

ChessBoardWidget(
    {Key? key,
    Player? onTop,
    required this.state,
    ChessBoardStyle? style,
    List<ChessBoardAnimation>? animations,
    List<Arrow>? arrows,
    required this.onPlayMove,
    this.onAnimationsCompleted})
    : onTop = onTop ?? Player.black,
      animations = animations ?? [],
      arrows = arrows ?? [],
      super(key: key) {
  this.style = style ?? defaultChessBoardStyle;
}