pick method

Future<String?> pick({
  1. required BuildContext context,
  2. ImageSource imageSource = ImageSource.gallery,
  3. double? ratioX,
  4. double? ratioY,
})

Implementation

Future<String?> pick(
    {required BuildContext context,
    ImageSource imageSource = ImageSource.gallery,
    double? ratioX,
    double? ratioY}) async {
  XFile? xFile =
      await getImagePicker(context)!.pickImage(source: imageSource);

  if (xFile == null) {
    return null;
  }

  return await _handleImageCropping(context, xFile,
      ratioX: ratioX, ratioY: ratioY);
}