ResizeImage constructor

const ResizeImage(
  1. ImageProvider imageProvider,
  2. {int width,
  3. int height,
  4. bool allowUpscaling: false}
)

Creates an ImageProvider that decodes the image to the specified size.

The cached image will be directly decoded and stored at the resolution defined by width and height. The image will lose detail and use less memory if resized to a size smaller than the native size.

Implementation

const ResizeImage(
  this.imageProvider, {
  this.width,
  this.height,
  this.allowUpscaling = false,
}) : assert(width != null || height != null),
     assert(allowUpscaling != null);