---
title: "image_cropper_widget"
description: "A pure Dart image cropping package for Flutter. No platform-native dependency means no method channel, no per-platform divergence and no added binary weight, with flip, rotate and aspect-ratio locking implemented as widget-tree transformations."
url: "https://dewmina.dev/projects/image-cropper-widget"
canonical: "https://dewmina.dev/projects/image-cropper-widget"
kind: "OPEN SOURCE"
year: "2025"
status: "Published on pub.dev"
role: "Author and maintainer"
author: "Dewmina Udayashan"
---

# image_cropper_widget

A Flutter cropper with no platform channel: pure Dart, so it behaves identically everywhere.

A pure Dart image cropping package for Flutter. No platform-native dependency means no method channel, no per-platform divergence and no added binary weight, with flip, rotate and aspect-ratio locking implemented as widget-tree transformations.

**My role:** Author and maintainer

**Status:** Published on pub.dev

**Links:** [pub.dev](https://pub.dev/packages/image_cropper_widget) · [Source](https://github.com/DewminaUdayashan/image_cropper_view)

**Stack:** Flutter, Dart

## The problem

The established Flutter croppers wrap native UIKit and Android libraries. That brings three costs an app pays forever: binary size, a method-channel boundary that makes deep UI customisation impractical, and two separate behaviours to test because the iOS and Android cropper are genuinely different products. Doing it in Dart removes all three, provided the transformation maths and gesture handling are good enough to feel native anyway.

## The approach

- **No platform channel.** The entire cropping surface is a Flutter widget. One implementation, one behaviour, one set of tests, and it works anywhere Flutter runs, including web and desktop, which the native wrappers do not.
- **Transformations as matrix maths.** Flip, rotate and aspect-ratio locking composed as coordinate transformations in the widget tree, so the crop rectangle stays correct under any combination of them.
- **A styleable overlay.** Handles, grid and overlay are injectable, so the cropper can be made to look like the host app rather than like someone else's design system.

## System architecture

- **Gesture layer.** Pan, pinch and handle drags resolved against the current transformation
- **Transform core.** Composed flip, rotate and aspect-lock matrices keeping the crop rect valid
- **Overlay.** Injectable handle, grid and mask widgets for host-app styling

## Engineering decisions

### Pure Dart is a distribution decision, not a purity one

A package that binds to native code inherits every platform's release cycle and every consumer's build configuration. A package that does not runs everywhere Flutter runs and can be reviewed in one read.

---

Written by Dewmina Udayashan. Full site: https://dewmina.dev
