Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface customization #16

Open
Eriickson opened this issue Oct 16, 2023 · 2 comments
Open

Interface customization #16

Eriickson opened this issue Oct 16, 2023 · 2 comments

Comments

@Eriickson
Copy link

Congratulations for such a great package that you have developed, but I have a question:

  • there is the possibility of being able to hide the rotation bar
  • hide some buttons dynamically through parameters
  • You can also add a maximum and minimum zoom

Thanks in advance

@talamaska
Copy link
Contributor

talamaska commented Oct 18, 2023

I'm not very experienced with the library. I'm just keeping an eye on it for my personal project.
There is a list of enabledTransformations, that you can pass and this should control what buttons for transformations you will have. For example: I would only rotate around its center and resize, so panAndScale, resize and rotate. Looking at the source code https://github.com/kekland/croppy/blob/master/lib/src/widgets/material/toolbar/material_image_cropper_toolbar.dart#L18C11-L18C11
It looks like the slider is shown only if the list of transformations contains rotateZ.
In the end you can create your own ImageCropperPage.
That's about the first 2 points.
I guess @kekland can add his 2cents about the last point.

@kekland
Copy link
Owner

kekland commented Nov 6, 2023

Hi! Everything is theoretically customizable so all of those can be done with extending the pre-existing classes. However, with a default cupertino/material croppers it's possible to hide some buttons by providing a list of allowed transformations (see allowedTransformations). Max/min zoom is not supported yet but is on the roadmap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants