ResizeImage constructor

const ResizeImage(
  1. ImageProvider<Object> imageProvider, {
  2. int? width,
  3. int? height,
  4. ResizeImagePolicy policy = ResizeImagePolicy.exact,
  5. 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.

At least one of width and height must be non-null.

Implementation

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