OptionsJS constructor

OptionsJS({
  1. double? maxSizeMB,
  2. double? maxWidthOrHeight,
  3. bool? useWebWorker,
  4. double? maxIteration,
  5. double? exifOrientation,
  6. dynamic onProgress(
    1. double progress
    )?,
  7. String? fileType,
  8. double? initialQuality,
  9. bool? alwaysKeepResolution,
  10. bool? preserveExif,
  11. String? libURL,
})

Implementation

external factory OptionsJS({
  /** @default Number.POSITIVE_INFINITY */
  double? maxSizeMB,
  /** @default undefined */
  double? maxWidthOrHeight,
  /** @default true */
  bool? useWebWorker,
  /** @default 10 */
  double? maxIteration,
  /** Default to be the exif orientation from the image file */
  double? exifOrientation,
  /** A function takes one progress argument (progress from 0 to 100) */
  Function(double progress)? onProgress,
  /** Default to be the original mime type from the image file */
  String? fileType,
  /** @default 1.0 */
  double? initialQuality,
  /** @default false */
  bool? alwaysKeepResolution,
  /** @default undefined */
  // AbortSignal? signal,
  /** @default false */
  bool? preserveExif,
  /** @default https://cdn.jsdelivr.net/npm/browser-image-compression/dist/browser-image-compression.js */
  String? libURL,
});