FileCompressor class

A utility class for compressing various file types.

This class provides static methods to compress images and PDF files with customizable compression settings.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

compressImage({required File file, int quality = 80, int maxWidth = 1920, int maxHeight = 1080, ImageFormat? format, bool deleteOriginal = false}) Future<File>
Compresses an image file with specified parameters.
compressPdf({required File file, PdfCompressionLevel compressionLevel = PdfCompressionLevel.best, bool deleteOriginal = false}) Future<File>