cropImage method

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

Implementation

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