setPixelColor function
void
setPixelColor({})
Implementation
void setPixelColor({
required int x,
required int y,
required ByteData bytes,
// for correct representation of color bytes' coordinates
// in an array of image bytes
required int imageWidth,
required ui.Color newColor,
}) {
bytes.setUint32(
(x + y * imageWidth) * 4, // offset
colorToIntRGBA(newColor), // value
);
}