Image Cropper 图形裁剪插件

立即下载 ️⬇️

Image Cropper

适用于Android和iOS的Flutter插件支持裁剪图像

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

-无需配置

例子

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

参考

This plugin is based on two native libraries:

0%