A Flutter plugin for Android and iOS supports cropping images
Switch branches/tags
Nothing to show
Clone or download
Latest commit e0f2d1e Nov 15, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android update code document Nov 14, 2018
example update code document Nov 14, 2018
ios Support circular cropping. Oct 10, 2018
lib update code document Nov 15, 2018
screenshots add metadata Jun 27, 2018
.gitignore first commit Jun 27, 2018
CHANGELOG.md release v0.0.9 Nov 14, 2018
LICENSE add metadata Jun 27, 2018
README.md clarify document Jun 28, 2018
image_cropper.iml update code document Nov 14, 2018
image_cropper_android.iml first commit Jun 27, 2018
pubspec.yaml release v0.0.9 Nov 14, 2018

README.md

Image Cropper

A Flutter plugin for Android and iOS supports cropping images

pub package

Installation

Android

  • Add UCropActivity into your AndroidManifest.xml
<activity
    android:name="com.yalantis.ucrop.UCropActivity"
    android:screenOrientation="portrait"
    android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>

iOS

  • No configuration required

Example

Future<Null> _cropImage(File imageFile) async {
    File croppedFile = await ImageCropper.cropImage(
      sourcePath: imageFile.path,
      ratioX: 1.0,
      ratioY: 1.0,
      maxWidth: 512,
      maxHeight: 512,
    );
}

Credits

This plugin is based on two native libraries: