StyleImageRgba constructor
Throws ArgumentError if pixels length is not 4 * width * height.
Implementation
StyleImageRgba({
required this.width,
required this.height,
required this.pixels,
}) : super._() {
if (pixels.length != 4 * width * height) {
throw ArgumentError.value(
pixels.length,
'pixels',
'must be 4 * width * height (${4 * width * height}) for a ${width}x$height image',
);
}
}