picker_image_cropper 0.0.6 copy "picker_image_cropper: ^0.0.6" to clipboard
picker_image_cropper: ^0.0.6 copied to clipboard

A modern Flutter package for selecting and cropping images with a professional UI and advanced features.

0.0.6 #

  • Fix bug gradle

0.0.5 #

🔧 Fixes #

  • Edit LICENSE

0.0.4 #

⚡ Performance — Native crop pipeline (~10× faster) #

  • Native image load: Added resizeImageForCropper() call on first open — uses BitmapFactory.inSampleSize (Android), CGImageSourceCreateThumbnailAtIndex (iOS/macOS), GDI+ (Windows), gdk-pixbuf (Linux), and Canvas 2D (Web). Preview load drops from ~11 s to ~800 ms on a 2 MB JPEG.
  • Native crop: _performCropWithResult now calls cropImageNative() first (non-web). Full decode → rotate → crop → encode runs natively on a background thread in ~100–200 ms, replacing a Dart compute() isolate that took ~3 700 ms.
  • WebP output: Added OutputFormat enum (jpeg, png, webpLossy, webpLossless). Pass outputFormat: OutputFormat.webpLossy for ~30 % smaller files. Circle crops auto-upgrade to png/webpLossless for transparency. Dart isolate fallback (web) still uses JPEG/PNG.
  • Dart isolate fallback: Still available for web or when native fails. _compressImageBytesIsolate runs via compute() (background isolate) instead of blocking the UI thread.

🔧 Fixes #

  • Web/WASM: Removed dart:io direct import from modern_image_cropper.dart — file I/O is now fully routed through conditional platform stubs (file_reader_native.dart / file_reader_stub.dart). Package is web-compatible again.
  • Extension bug: _saveToTempFilePath was always writing .png for rectangle crops — now correctly uses the chosen OutputFormat extension.
  • return Future lint: Fixed return _pushCropper(...) inside try block (missing await) in capturePhoto.
  • Removed unused methods: _performCrop, _calculateDraggableCropRect, _calculateStaticCropRect, _applyCircleMask.

🆕 API additions #

  • OutputFormat enum exported from the package barrel — jpeg | png | webpLossy | webpLossless.
  • outputFormat parameter added to ModernImageCropper, pickAndCrop, capturePhoto, captureAndCrop, pickFromGalleryAndCrop, cropImage, cropImageWithCallback, cropImageWithResult, pickAndCropWithResult, pickAndCropWithCallback. Default is OutputFormat.jpeg — fully backwards-compatible.

0.0.3 #

🐛 Bug Fixes & Compatibility #

  • Web/WASM compatibility: Removed unconditional dart:io imports that broke web and WASM compilation
  • CropResult no longer holds a dart:io File field — replaced with String? filePath for full cross-platform support. On native platforms reconstruct with File(result.filePath!)
  • ModernImageCropper and ImagePickerCropper no longer import dart:io directly — file I/O is handled via conditional imports (dart.library.io) with web stubs
  • API change: cropImage, cropImageWithCallback, cropImageWithResult now take String imagePath instead of File imageFile
  • API change: OnImagePickerCompleted callback signature changed from Function(File? file, Uint8List? bytes) to Function(String? filePath, Uint8List? bytes)
  • API change: OnFilePickerCompleted callback signature changed from Function(File file) to Function(String filePath)
  • Fixed ListTile assertion: wrapped SwitchListTile in Material(color: Colors.transparent) inside example app to prevent invisible ink splash

0.0.2 #

  • Fix support for web

0.0.1 #

✨ New Features #

  • Camera Capture: Added capturePhoto() method for direct camera capture with automatic cropping
  • Dual Output Support: Get both bytes (Uint8List) and file outputs with path information
  • Modern UI: Professional-looking interface with customizable themes
  • Multiple Aspect Ratios: Support for free, square, 4:3, 16:9, 3:2, and 3:4 ratios
  • Shape Options: Rectangle and circle cropping overlays
  • Interactive Cropping: Draggable crop box with resize handles
  • Image Transformations: Rotate, zoom, and reset functionality
  • Grid Overlay: Toggle grid lines for better alignment
  • Theme Customization: Dark, light, and blue themes
  • Cross-platform: Works on Android, iOS, and other Flutter platforms

📱 Camera Integration #

  • ImagePickerCropper.capturePhoto() - Capture from camera and crop in one step
  • ImagePickerCropper.pickFromGalleryAndCrop() - Pick from gallery and crop
  • ImagePickerCropper.captureAndCrop() - Alternative camera capture method
  • Comprehensive error handling for camera permissions and availability
  • Support for compression settings and quality control

🎨 UI/UX Improvements #

  • Modern, professional interface design
  • Smooth animations and transitions
  • Responsive layout for different screen sizes
  • Intuitive gesture controls

🔧 Technical Features #

  • Efficient image processing with the image package
  • Memory-optimized handling of large images
  • Support for both web and mobile platforms

📚 Documentation #

  • Comprehensive README with usage examples
  • Complete example app demonstrating all features
  • Error handling guidelines
  • API reference documentation
1
likes
160
points
101
downloads

Documentation

API reference

Publisher

verified publisherswanflutterdev.com

Weekly Downloads

A modern Flutter package for selecting and cropping images with a professional UI and advanced features.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

equatable, flutter, image, image_picker_master, path

More

Packages that depend on picker_image_cropper