1
0
mirror of https://github.com/nisrulz/flutter-examples.git synced 2025-11-09 04:58:58 +00:00

New Example - QR Code Scanner (#122)

Co-authored-by: Mridul <mridul@Mriduls-MacBook-Pro.local>
This commit is contained in:
Mridul Dhiman
2022-10-22 23:42:12 +05:30
committed by GitHub
parent fe71b47e3e
commit 1564ccdff2
67 changed files with 1639 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import 'package:flutter/material.dart';
import 'package:mobile_scanner/mobile_scanner.dart';
class QRCodeScanner extends StatelessWidget {
final MobileScannerController mobileScannerController;
final bool allowDuplicates;
final Function(Barcode barcode, MobileScannerArguments? args) onDetect;
const QRCodeScanner({Key? key, required this.mobileScannerController,required this.allowDuplicates, required this.onDetect}) : super(key: key);
@override
Widget build(BuildContext context) {
return MobileScanner(
allowDuplicates: allowDuplicates,
controller: mobileScannerController,
onDetect: onDetect,
);
}
}