flutter_image_cropper
flutter_image_cropper copied to clipboard
Circular crop
Hi , I m trying to crop circular image after image picker, Ui is showing as circular , but after cropping file is not circularly cropped . Please suggest if im missing anything.
File cropped = await ImageCropper.cropImage( sourcePath: _photoUrlFile.path, compressQuality: 99, cropStyle: CropStyle.circle, compressFormat: ImageCompressFormat.png, // aspectRatioPresets: [CropAspectRatioPreset.square], // maxWidth: 1200, // maxHeight: 1400, androidUiSettings: AndroidUiSettings( toolbarColor: Colors.orange, toolbarWidgetColor: Colors.white, lockAspectRatio: false, toolbarTitle: 'Crop It'), );
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel beta, 2.2.0-10.1.pre, on Microsoft Windows [Version 10.0.18362.30], locale en-IN) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [√] Chrome - develop for the web [√] Android Studio (version 4.1.0) [√] Connected device (2 available)
• No issues found!
Using image_cropper : 1.4.0 implementation 'com.github.yalantis:ucrop:2.2.6' . Given example also not working with circular image crop .
I have the same question.
Any update ?
any update on this?
I also encountered this problem, is this a BUG?
Same issue here, using version 1.4.1
Although the final image isn't cropped in a circular form, it is cropped in a square shape, which is ideal. Use the CircleAvatar widget to display the image.
CircleAvatar(backgroundImage: AssetImage('<filepath>'),);
or
CircleAvatar(backgroundImage: NetworkImage('<fileURL'>),);