scanBarcode static method
Scans a barcode and returns the result as a String.
Returns null if the scan fails or is cancelled.
Implementation
static Future<String?> scanBarcode() async {
try {
return await BarcodeScannerPocPlatform.instance.scanBarcode();
} catch (e) {
debugPrint("Error to process the barcode: '$e'");
return null;
}
}