onBarcodeResult method
Method called on barcode result to finish the process and send result
Implementation
Future<void> onBarcodeResult(String _barcode) async {
_barcodeResults.add(_barcode);
if (_barcodeResults.gotResult) {
releaseResources();
if (!completer.isCompleted) {
completer.complete(_barcodeResults.mostFrequentBarcode);
_barcodeResults.clear();
}
}
}