PaintingBoard constructor
PaintingBoard({
- Key? key,
- double? boardHeight,
- double? boardWidth,
- Color? boardBackgroundColor,
- BoxDecoration? boardDecoration,
- PaintingBoardController? controller,
A board where the user can paint.
Implementation
PaintingBoard({
Key? key,
double? boardHeight,
double? boardWidth,
Color? boardBackgroundColor,
BoxDecoration? boardDecoration,
PaintingBoardController? controller,
}) : assert(
boardBackgroundColor == null || boardDecoration == null,
'Cannot provide both a boardBackgroundColor and a boardDecoration\n'
'To provide both, use "boardDecoration: BoxDecoration(color: boardDecoration)".',
),
_boardHeight = boardHeight ?? double.infinity,
_boardWidth = boardWidth ?? double.infinity,
_boardBackgroundColor = boardBackgroundColor ??
(boardDecoration == null ? Colors.black12 : null),
_boardDecoration = boardDecoration,
_controller = controller ?? PaintingBoardController(),
super(key: key);