operator [] method

  1. @override
Color? operator [](
  1. Position position
)
override

Get the color at the specified position.

Returns null if the position is transparent or out of bounds.

Implementation

@override
Color? operator [](Position position) =>
    _data[position.y * size.width + position.x];