Compression.withSize constructor

const Compression.withSize(
  1. {required int maxFileSize,
  2. int minWidth = 1920,
  3. int minHeight = 1080}
)

Creates compression from minWidth & minHeight.

Implementation

const Compression.withSize({
  required this.maxFileSize,
  this.minWidth = 1920,
  this.minHeight = 1080,
})  : quality = 10,
      inSampleSize = 1,
      rotate = 0,
      autoCorrectionAngle = true,
      keepExif = false,
      numberOfRetries = 5,
      format = CompressFormat.jpeg,
      assert(minWidth > 0, 'minWidth must be greater than 0'),
      assert(minHeight > 0, 'minHeight must be greater than 0');