detect method
Implementation
@override
void detect(DetectableImage image, bool streamed) async
{
if (!busy)
{
busy = true;
count++;
Payload? payload = await IBarcodeDetector().detect(image, barcodeFormats, tryharder, invert);
if (payload != null)
{
Data data = Payload.toData(payload);
await onDetected(data);
}
else if (!streamed) {
await onDetectionFailed(Data(data: [{"message" : "Barcode detector $id failed to detect any barcodes in the supplied image"}]));
}
busy = false;
}
}