Skip to content

A Flutter plugin for Android and iOS supports cropping images

License

Notifications You must be signed in to change notification settings

restra-social/flutter_image_cropper

 
 

Repository files navigation

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:

About

A Flutter plugin for Android and iOS supports cropping images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 45.5%
  • Objective-C 24.2%
  • Dart 19.6%
  • Ruby 9.2%
  • Shell 1.5%