cropSize property
Size
cropSize
Calculates the crop size based on the relative positions of the cropRect, imageRect and the original imageSize.
Implementation
Size get cropSize {
if ((cropRect, imageRect, imageSize)
case (
final Rect cropRect,
final Rect imageRect,
final Size imageSize,
)) {
final width = cropRect.width / imageRect.width * imageSize.width;
final height = cropRect.height / imageRect.height * imageSize.height;
return Size(width, height);
}
throw const NativeImageCropperException(
'NullPointerException',
'Crop rect, image rect or image size are not initialized!',
);
}