onDetect property
Function that gets called when a Barcode is detected.
barcode The barcode object with all information about the scanned code.
args Information about the state of the MobileScanner widget
Implementation
final void Function(BarcodeCapture)? onDetect;