getPixel method

Color getPixel(
  1. int x,
  2. int y
)

Implementation

Color getPixel(int x, int y) {
  if (x < 0 || x >= width || y < 0 || y >= height) {
    throw RangeError('Pixel coordinates ($x, $y) are out of bounds');
  }

  // Note: This method is synchronous but may be slow for large images
  // Consider using toByteData() for better performance when accessing many pixels
  throw UnsupportedError('getPixel is not supported on native images. '
      'Use toByteData() to access pixel data asynchronously.');
}