setPixel method
Implementation
@override
void setPixel(int x, int y, dynamic spec) {
pixels[x][y] = spec is PixelSpec
? spec
: spec is int
? PixelSpec(color: spec)
: throw Exception('Invalid Pixel Spec: ${spec}');
}