cropNative function

  1. @deprecated
Future<PFile?> cropNative(
  1. BuildContext context,
  2. PFile imageFile
)

Implementation

@deprecated
Future<PFile?> cropNative(BuildContext context, PFile imageFile) async {
  final cropped = await imageCropper.cropImage(
    sourcePath: imageFile.path!,
    iosUiSettings: IOSUiSettings(
      showActivitySheetOnDone: false,
      hidesNavigationBar: true,
    ),
    aspectRatio: CropAspectRatio(ratioX: 1, ratioY: 1),
    maxWidth: 2048,
    maxHeight: 2048,
  );

  if (cropped == null) return null;
  return PFile.of(cropped);
}