final googleVision = await GoogleVision.withJwt('path_to_your_jwt_credentials.json');
final image = Painter.fromFilePath(imagePath);
// You can crop the image if necessary to optimize the upload
final cropped = image.copyCrop(70, 30, 640, 480);
await cropped.writeAsJpeg('example/cropped.jpg');
final requests = AnnotationRequests(requests: [
AnnotationRequest(image: cropped, features: [
Feature(maxResults: 10, type: 'LABEL_DETECTION'),
])
]);
Error Message : The argument type 'Painter' can't be assigned to the parameter type 'Image'.dartargument_type_not_assignable Painter cropped Type: Painter
I face this error when trying to implement Google Vision API for label detection in my Flutter application,please help.
solution to solve the error