setColor method Null safety

void setColor(
  1. int index,
  2. int r,
  3. int g,
  4. int b
)

Implementation

void setColor(int index, int r, int g, int b) {
  final ci = index * 3;
  colors[ci] = r;
  colors[ci + 1] = g;
  colors[ci + 2] = b;
}