hnvn/flutter_image_cropper

IOSUiSettings.aspectRatioLockDimensionSwapEnabled doesn't seem to automatically rotate the crop area

Opened this issue · 2 comments

I upgraded from 2.0.x to 7 as I was updating the app to the latest flutter and found the IOSUiSettings.aspectRatioLockDimensionSwapEnabled doesn't seem to enable the old functionality as shown below

RPReplay_Final1718585242.mov

And now it just does this

image
after a 90 deg rotate
image
This is the configuration I used

CroppedFile? croppedFile = await ImageCropper().cropImage(
      sourcePath: image.path,
      aspectRatio: CropAspectRatio(ratioX: 1.417, ratioY: 1),
      compressFormat: ImageCompressFormat.png,
      uiSettings: [
        AndroidUiSettings(
          toolbarTitle: 'Crop image',
          toolbarColor: ColorConsts.main,
          lockAspectRatio: true,
        ),
        IOSUiSettings(
          title: 'Crop image',
          aspectRatioLockEnabled: true,
          aspectRatioLockDimensionSwapEnabled: true,
          aspectRatioPickerButtonHidden: false,
        ),
      ],
    );

Hi, I noticed you mentioned that after upgrading from 2.0.x to 7, the IOSUiSettings.aspectRatioLockDimensionSwapEnabled doesn't seem to enable the old functionality in the image_cropper package. I am facing the same problem on version 8.0.0, 8.01 and 8.0.2 for IOS. Were you able to find a solution or alternative to this? Any help would be greatly appreciated!

Sorry, nothing from the author. I suspect this goes deeper as the dependency is a collation of several cropping implementations and the problem is actually the author of the ios implementation's changes.