cropSize property
Rect
get
cropSize
Current crop rectangle of the image (pixels).
left, right, top and bottom are in pixels.
If the aspectRatio was specified, the rectangle will be adjusted to fit that ratio.
See also:
- crop, which represents the same rectangle in percentage.
Implementation
Rect get cropSize => value.crop.multiply(_bitmapSize);
set
cropSize
(Rect newCropSize)
Implementation
set cropSize(Rect newCropSize) {
if (value.aspectRatio != null) {
value = value.copyWith(
crop: _adjustRatio(
newCropSize.divide(_bitmapSize), value.aspectRatio!));
} else {
value = value.copyWith(crop: newCropSize.divide(_bitmapSize));
}
notifyListeners();
}