From c9a36848d10fd0a11fa73ef4bd4021f057c0c9f7 Mon Sep 17 00:00:00 2001 From: Ryanidk Date: Wed, 28 Feb 2024 20:16:59 -0500 Subject: [PATCH] a --- lib/screens/scan.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/screens/scan.dart b/lib/screens/scan.dart index 34c5868..01b5289 100644 --- a/lib/screens/scan.dart +++ b/lib/screens/scan.dart @@ -21,6 +21,7 @@ class ScanResultsPage extends StatefulWidget { class _ScanResultsPageState extends State { final GlobalKey qrKey = GlobalKey(debugLabel: 'QR'); Barcode? result; + bool sentData = false; QRViewController? controller; void sendData(values, isGame) { @@ -67,7 +68,8 @@ class _ScanResultsPageState extends State { this.controller = controller; controller.scannedDataStream.listen((scanData) { result = scanData; - if (result != null) { + if (result != null && !sentData) { + sentData = true; String? resultData = result!.code; Map? resultDataMap = jsonDecode(resultData!); bool? isGame = resultDataMap!['isGame'] == "y" ? true : false;