cropImage method

Future<File?> cropImage(
  1. File imageFile,
  2. ImageManipulationSettings cropSettings
)

Implementation

Future<File?> cropImage(
    File imageFile, ImageManipulationSettings cropSettings) async {
  final File? croppedFile = await ImageCropper.cropImage(
    sourcePath: imageFile.path,
    aspectRatio: cropSettings.aspectRatio,
    maxWidth: cropSettings.maxWidth,
    maxHeight: cropSettings.maxHeight,
  );
  return croppedFile;
}