set method

void set(
  1. int x,
  2. int y,
  3. Color color
)

Sets the ARGB color of the pixel at the given (x,y).

Implementation

void set(int x, int y, Color color) {
  final argbColorInt = color.value;
  final rgbaColorInt = ((argbColorInt & 0xFF000000) >> 24) | ((argbColorInt & 0x00FFFFFF) << 8);
  pixels.setPixel(width, x, y, Color(rgbaColorInt));

  _isFlutterImageDirty = true;
}