createImageData method Null safety

ImageData createImageData()

Implementation

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