drawImage method Null safety

void drawImage(
  1. Image image,
  2. Offset offset,
  3. Paint paint

Draws the given Image into the canvas with its top-left corner at the given Offset. The image is composited into the canvas using the given Paint.


void drawImage(Image image, Offset offset, Paint paint) {
  assert(image != null); // image is checked on the engine side
  assert(paint != null);
  final String? error = _drawImage(image._image, offset.dx, offset.dy, paint._objects, paint._data, paint.filterQuality.index);
  if (error != null) {
    throw PictureRasterizationException._(error, stack: image._debugStack);