Skip to content
pubscout

crop_your_image

2.0.1, released 8 weeks ago by tsuyoshichujo.com

Flutter widget to embed customizable image cropping UI anywhere in your widget tree.

WASM-readyRock solid
$ flutter pub add crop_your_image
Source repository

What it does

Provides a flexible Crop widget that can be placed anywhere on screen, allowing users to pan, zoom, crop with rectangles or circles, and fix aspect ratios. Controlled programmatically via a CropController with support for undo and redo operations.

AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a custom inline image cropping UI inside a screen, dialog, or bottom sheet.
  • You want full control over the surrounding layout and buttons for the cropping interface.
  • You need interactive panning, zooming, and aspect ratio fixing for images.

Skip it when

  • You are looking for a complete out-of-the-box picker and cropper screen with pre-built control buttons.
  • You need to read or download image files directly from local storage or remote sources.

Strengths

  • Flexible placement anywhere in the widget tree with minimal UI restrictions.
  • Includes a CropController for external control, undo, and redo features.
  • Supports customizable backend logic for format detection, parsing, and cropping.

Weaknesses

  • Does not provide out-of-the-box UI control buttons; you must build your own buttons.
  • Does not handle image loading or file reading from storage or internet sources.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

No special native permissions or build runner configuration required.

final _controller = CropController();

@override
Widget build(BuildContext context) {
  return Crop(
    image: _imageData, 
    controller: _controller,
    onCropped: (result) {
      switch(result) {
        case CropResult.success(:final croppedImage):
          // do something with cropped image data 
        case CropResult.error(:final error):
          // do something with error
      }
    }
  );
}

Alternatives

Packages that do the same job and could replace crop_your_image.

Works with

Packages commonly used together with crop_your_image: ones it builds on, ones built on it, and its own family.