xclud / flutter_crop

Crop any widget/image in Android, iOS, Web and Desktop with fancy and customizable UI, in pure Dart code.
https://pub.dev/packages/crop
MIT License
256 stars 84 forks source link

Disable rotation? #64

Closed Mayb3Nots closed 2 years ago

Mayb3Nots commented 3 years ago

Is there a way to disable rotation to only accept scale input? I wanna zoom in without touching the rotation of the image

xclud commented 3 years ago

@Mayb3Nots Currently not possible. This is a great feature to have. Adding this issue to project v1.

xclud commented 3 years ago

@Mayb3Nots Meanwhite, you can set interactive to false and wrap Crop widget in a GestureDetector and scale using CropController.scale.

Mayb3Nots commented 3 years ago

@xclud I have added a PR to add this feature. #66

Keatr0n commented 2 years ago

I had this problem too, I just did this onChanged: (data) {if (data.rotation != 0) {croppedController.rotation = 0;}},

xclud commented 2 years ago

I am closing this PR as @Keatr0n's solutions seems OK. Thank you.

paricleu commented 2 years ago

I think this feature warrants its own flag and not some workaround in a callback that's not meant for disabling features. Is there a reason the PR couldn't be merged into the plugin? If there are things that need fixing I would be willing to have a go at it.

Mayb3Nots commented 2 years ago

I think this feature warrants its own flag and not some workaround in a callback that's not meant for disabling features. Is there a reason the PR couldn't be merged into the plugin? If there are things that need fixing I would be willing to have a go at it.

I agree with everything you mentioned