flutter_image_compress_lite 2.1.1
flutter_image_compress_lite: ^2.1.1 copied to clipboard
Standalone image compression plugin — no WebP deps, SPM support, AGP 9+. Drop-in replacement for flutter_image_compress.
2.1.1 #
- iOS: fix iOS build failure introduced in 2.1.0 — corrected selector capitalization to
HEIFRepresentationOfImage:format:colorSpace:options:(washeifRepresentationOfImage:, which doesn't exist onCIContext).
2.1.0 #
User-visible fixes:
- BREAKING:
numberOfRetriesparameter oncompressWithFile/compressAndGetFilerenamed toandroidOomRetries. The retry behavior was always Android-only (decode OOM → doubleinSampleSizeand recurse); the new name reflects that. iOS ignores the value as before. - iOS: WebP encoding now throws
UnsupportedErrorup front instead of silently returningnull(decoding still works on iOS 14+). - iOS: HEIC encoding no longer writes through
NSTemporaryDirectory()— usesheifRepresentationOfImage:directly. Removes a per-call temp-file leak. - Dart: validator contract is now consistent — every entry point throws
UnsupportedErrorfor unsupported encodings (previously some returnednull). The validator only checks the output format; input formats are auto-detected by the native decoder.
Internal cleanup:
- Android: introduced
CompressFormatenum to replace0/1/2/3magic numbers throughout the handlers andFormatRegister. - Android:
ExifKeeperported from Java to Kotlin;settings.gradle→settings.gradle.kts. - Android: bumped Gradle wrapper to 9.5.0,
compileSdkto 36. - Android: removed dead code paths (
ResultHandler.replyError,ExifKeeper.copyExifToFile, duplicateBitmap.compressextensions,System.gc()in OOM retry, pre-MarshmallowinDitherbranch). - iOS: introduced
ImageCompressFormatNS_ENUMmirroring the Dart/Android enums. - iOS: removed dead
getSystemVersionObj-C handler (Dart only calls Android for the API 28 check). - Dart: dropped
part/part ofin favor of regular libraries withimport/export;CompressFormat.nativeValuegetter replaces the private_convertTypeToInthelper; default param values centralized in a private_Defaultsclass.
2.0.3 #
Merged flutter_image_compress + flutter_image_compress_common into a single standalone package.
No federated plugin architecture, no transitive dependencies with podspecs, no CocoaPods required.
- BREAKING: New package name
flutter_image_compress_lite— change import - BREAKING: Remove WebP encoding on iOS (decoding works natively on iOS 14+)
- BREAKING: Require Dart ^3.11.0, Flutter >=3.41.0, iOS 15.0+, Android minSdk 24, AGP 9+
- iOS: SPM only, zero third-party deps
- iOS: keepExif via native ImageIO (no Mantle)
- Android: Kotlin DSL, removed commons-io, bumped exifinterface 1.4.2, heifwriter 1.1.0