I need to scan the same barcode for many times . I'm using qr_code_scanner plugin for scanning. problem is it scans continuously without any gap .so when i scanned two times , it takes as 5 or 6 times like that. I need to set interval . Any help might help . Thanks .
'''updateQRView(QRViewController controller) {
qrController = controller;
qrController?.scannedDataStream?.listen((data) {
validateBulkReceive(data.code.toString());
Timer timer = new Timer(new Duration(seconds: 1), () {
});
}
);
}'''
'''Widget _buildQrView(BuildContext context) {
ScanPackageBloc _scanPackageBloc =
ScanPackageBlocProvider.getScanPackageBloc(context);
SnackbarUtil snackbarUtil = SnackbarUtil();
snackbarUtil.buildContextItemScan = context;
//var scanArea = (MediaQuery.of(context).size.width < 400 ||
// MediaQuery.of(context).size.height < 400) ? 250.0 : 300.0;
return Padding(
padding: const EdgeInsets.only(top: 10, bottom: 10),
child: QRView(
key: qrKey,
onQRViewCreated: _scanPackageBloc.updateQRView,
overlay: QrScannerOverlayShape(cutOutBottomOffset: 0,
borderColor: Colors.black,
borderRadius: 10,
borderLength: 30,
borderWidth: 5,
cutOutSize: 250),
),
);
}'''