operator []= method

  1. @override
void operator []=(
  1. Position position,
  2. Color? color
)
override

Set the color at the specified position.

Use null to make the position transparent.

Implementation

@override
void operator []=(Position position, Color? color) {
  _data[position.y * size.width + position.x] = color;
}