toImageSafe method

Future<Image> toImageSafe(
  1. int width,
  2. int height
)

Converts Picture into an Image and disposes of the picture.

Implementation

Future<Image> toImageSafe(int width, int height) {
  return toImage(width, height).then((image) {
    dispose();
    return image;
  });
}