showBarCodeScanner method
void
showBarCodeScanner(
- BuildContext context,
- ValueChanged<
String> onResult, - VoidCallback onFailed
Implementation
void showBarCodeScanner(
BuildContext context,
ValueChanged<String> onResult,
VoidCallback onFailed,
) {
showDialog(
context: context,
builder:
(context) => _ScannerScreen(
onScanned: (result) {
onResult(result);
Navigator.of(context).pop();
},
onFailed: onFailed,
),
).then((value) {});
}