Created
March 14, 2022 22:04
-
-
Save r-yeates/f3008cc2653fda98896b95635708f629 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:mobile_scanner/mobile_scanner.dart'; | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar(title: const Text('Mobile Scanner')), | |
| body: MobileScanner( | |
| allowDuplicates: false, | |
| onDetect: (barcode, args) { | |
| final String? code = barcode.rawValue; | |
| debugPrint('Barcode found! $code'); | |
| }), | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment