scanItem method

  1. @override
Future<Either<Failure, Success>> scanItem({
  1. String? email,
})
override

set isAR = true then it will process the image detection using amazon rekognition

Implementation

@override
Future<Either<Failure, Success>> scanItem({String? email}) async {
  try {
    var image =
        await picker.pickImage(source: ImageSource.camera, imageQuality: 80);
    var result = await scanItemsByAR(image!, email: email);
    return result;
  } catch (e) {
    return Left(ItemNotDetectedFailure());
  }
}