getImageData method Null safety

ImageData getImageData()

Implementation

ImageData getImageData() {
  final rect = sourceRectangle;
  final context = renderTexture.canvas.context2D;
  return context.getImageData(rect.left, rect.top, rect.width, rect.height);
}