ChessBoard constructor

ChessBoard({
  1. required double initialSize,
  2. required ChessboardController controller,
  3. bool whiteSideTowardsUser = true,
  4. double minSize = 400,
  5. BoardType boardType = BoardType.brown,
  6. Color notationPanelBackgroundColor = Colors.black,
  7. double notationPanelWidth = 200,
  8. Color notationColor = Colors.white,
  9. bool showNotationPanel = true,
  10. Color containerColor = Colors.transparent,
  11. Radius containerRadius = const Radius.circular(10),
  12. Widget? notationTopBar = const Padding(padding: const EdgeInsets.all(8.0), child: Text('Notation', style: TextStyle(color: Colors.white))),
})

Implementation

ChessBoard({
  required this.initialSize,
  required this.controller,
  this.whiteSideTowardsUser = true,
  this.minSize = 400,
  this.boardType = BoardType.brown,
  this.notationPanelBackgroundColor = Colors.black,
  this.notationPanelWidth = 200,
  this.notationColor = Colors.white,
  this.showNotationPanel = true,
  this.containerColor = Colors.transparent,
  this.containerRadius = const Radius.circular(10),
  this.notationTopBar = const Padding(
    padding: const EdgeInsets.all(8.0),
    child: Text('Notation', style: TextStyle(color: Colors.white)),
  ),
})  : assert(
        initialSize >= minSize,
        'size property must be greater or equal to minSize',
      ),
      assert(notationPanelWidth >= 200,
          'notationPanelWidth must be at least 200');