Set the red channel of the pixel, or the index value for palette images.
@override void setPixelR(int x, int y, num i) { final index = y * width * numChannels + (x * numChannels); data[index] = i.toInt(); }