cropImage static method
Crops an image
Crops the given image
.
originX
and originY
control from where the image should be cropped.
width
and height
control how the image is being cropped.
Implementation
static Future<File> cropImage({
required File image,
required int originX,
required int originY,
required int width,
required int height,
}) async {
final compressedFile = await FlutterNativeImage.cropImage(
image.absolute.path,
originX,
originY,
width,
height,
);
return compressedFile;
}