flutter image cropper
a flutter plugin for android and ios supports cropping images.
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,
);
}
Comments are closed.