DrawingCanvasImpl constructor
Implementation
DrawingCanvasImpl({
required this.width,
required this.height,
}) {
if (width % 2 != 0) {
throw Exception('Width must be a multiple of 2!');
} else if (height % 4 != 0) {
throw Exception('Height must be a multiple of 4!');
} else {
content = List<int>.filled(
width * height ~/ 8,
0,
);
}
}