Skip to content

How to keep clipping mask static when rotating image in ImageCropper in Flutter? #590

Open
@SergioMordente

Description

@SergioMordente

Describe the bug
When using the image_cropper plugin in my Flutter app, the crop mask rotates along with the image when the rotation buttons are used. This is not the desired behavior—I need the crop mask to remain static while the image rotates. I am currently using version 8.0.2, but this issue also occurs in previous versions.

To Reproduce
Steps to reproduce the behavior:

Implement the image_cropper plugin with the following iOS settings:

`IOSUiSettings(
title: 'Crop Image',
resetAspectRatioEnabled: false,
aspectRatioLockDimensionSwapEnabled: false,
aspectRatioLockEnabled: true,
rotateButtonsHidden: false, // Rotation buttons visible
)

Load an image and attempt to crop it.
Use the rotation buttons to rotate the image.
Observe that the crop mask rotates along with the image.
Expected behavior
The crop mask should maintain the same proportions and position, even after the image is rotated.

Screenshots
If applicable, add screenshots to help explain the problem.

iOS Device:

Device: [e.g. iPhone 14]
OS: [e.g. iOS 17.5.1]
Library Version: [e.g. 8.0.2]
Additional context
I’ve tried various settings, but the issue persists. Is there a configuration or workaround that can keep the crop mask static during image rotation?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions