deakjahn / crop_image

An image cropper widget. Supports mobile, web and desktop.
https://pub.dev/packages/crop_image
MIT License
56 stars 31 forks source link

Custom corners - option to hide corners #48

Open hedi-ghodhbane opened 6 months ago

hedi-ghodhbane commented 6 months ago

I find that this package is great, but it's missing some basic features like:

deakjahn commented 5 months ago

@hedi-ghodhbane The corners are already disappearing based on some logic (if the resizing is disabled by setting the minimum and the maximum sizes to the same value). You probably would like to override this behavior then?

See: https://github.com/deakjahn/crop_image/blob/07a64ab2c476e954e1d02e7acff16d51875e7377/lib/src/crop_image.dart#L267-L275

deakjahn commented 5 months ago

This part was straightforward but the other suggestion should be discussed. There are several ways to solve that, the simpler one being just a callback with the canvas passed, the more complicated (and probably not really necessary) one would be to accept a replacement CustomPainter.