Set the red (or index) color channel of a pixel.
void setPixelR(int x, int y, num i) => data?.setPixelR(x, y, i);