Skip to content

Release v1.0.2

Choose a tag to compare

@joutvhu joutvhu released this 26 Apr 11:06
· 24 commits to main since this release

Bug Fixes

iOS

  • Fixed a crash caused by incorrect format string in auto-generated output path (%d.%s%d.%@). This caused the app to crash or produce a malformed file path when no explicit output path was provided.
  • Fixed conversion always returning nilUIImage(named:) was incorrectly used to load images from a file path. Replaced with UIImage(contentsOfFile:).
  • Fixed a potential crash from force casting method channel arguments (as!). Now uses safe casting with guard let, returning a proper FlutterError if arguments are malformed.
  • Fixed silent nil return when image encoding fails — the plugin now returns a FlutterError with code conversionFailed instead of returning null to the caller with no explanation.
  • Fixed output file not being created when the parent directory does not exist.

Android

  • Fixed NullPointerException when BitmapFactory.decodeFile fails to decode the input file (unsupported format, corrupt file, or wrong path). Now throws a descriptive IOException.
  • Fixed FileOutputStream resource leak — the stream is now properly closed using try-with-resources.
  • Fixed output file not being created when the parent directory does not exist — parent directories are now created automatically with mkdirs().
  • Fixed Bitmap memory leak — bitmap.recycle() is now called in a finally block after compression to release native memory immediately.

Build & Infrastructure

  • Updated Android compileSdkVersion to 34.
  • Updated Android Gradle Plugin to 8.2.2 and Gradle wrapper to 8.4 for Java 21 compatibility.
  • Migrated example app Android build scripts to the declarative Flutter Gradle plugin (required by Flutter 3.x).
  • Updated Flutter SDK constraint from >=2.5.0 to >=3.0.0.
  • Bumped flutter_lints to 5.0.0.

Example App

  • Replaced network download with bundled HEIC/HEIF sample files for offline testing.
  • Added format selector (PNG / JPEG) and file picker to the example UI.
  • Added integration tests covering real file conversion with magic byte verification.