Mozart Image Cropper

A Flutter plugin for high-performance localized image cropping on Android (Native) with customizable UI in Flutter.

Features

  • Hybrid Architecture: Uses Flutter for flexible UI and Native Kotlin for high-performance cropping.
  • Profile Mode: Circular crop optimized for profile photos.
  • Normal Mode: Rectangular crop with Aspect Ratio controls (1:1, 4:5, 16:9).
  • System Theme Integration: Uses your app's primaryColor for buttons and active states.
  • Safe Area Handling: Explicitly calculates padding to ensure controls and crop areas never overlap with the status bar or navigation bar.

Getting Started

Add this to your package's pubspec.yaml file:

dependencies:
  mozart_image_cropper: ^0.0.1

Usage

Profile Crop

import 'package:mozart_image_cropper/mozart_image_cropper.dart';

File imageFile = File('path/to/image.jpg');

String? croppedPath = await MozartImageCropper.cropProfile(
  context: context,
  imageFile: imageFile,
);

if (croppedPath != null) {
  print("Cropped image saved at $croppedPath");
}

Normal Crop

String? croppedPath = await MozartImageCropper.cropImage(
  context: context,
  imageFile: imageFile,
);