ChessBoard constructor
ChessBoard({
- required double initialSize,
- required ChessboardController controller,
- bool whiteSideTowardsUser = true,
- double minSize = 400,
- BoardType boardType = BoardType.brown,
- Color notationPanelBackgroundColor = Colors.black,
- double notationPanelWidth = 200,
- Color notationColor = Colors.white,
- bool showNotationPanel = true,
- Color containerColor = Colors.transparent,
- Radius containerRadius = const Radius.circular(10),
- 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');