confirmAndUploadNewPicture function

Future<CropParameters?> confirmAndUploadNewPicture(
  1. BuildContext context, {
  2. required ImageField imageField,
  3. required String barcode,
  4. required ProductType? productType,
  5. required OpenFoodFactsLanguage language,
  6. required bool isLoggedInMandatory,
  7. UserPictureSource? forcedSource,
})

Lets the user pick a new product picture, crop it, and save it.

Implementation

Future<CropParameters?> confirmAndUploadNewPicture(
  BuildContext context, {
  required ImageField imageField,
  required String barcode,
  required ProductType? productType,
  required OpenFoodFactsLanguage language,
  required bool isLoggedInMandatory,
  UserPictureSource? forcedSource,
}) async => confirmAndUploadNewImage(
  context,
  cropHelper: ProductCropNewHelper(
    imageField: imageField,
    language: language,
    barcode: barcode,
    productType: productType,
  ),
  isLoggedInMandatory: isLoggedInMandatory,
  forcedSource: forcedSource,
);