Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryanidk committed Feb 29, 2024
1 parent d75d432 commit c9a3684
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/screens/scan.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ScanResultsPage extends StatefulWidget {
class _ScanResultsPageState extends State<ScanResultsPage> {
final GlobalKey qrKey = GlobalKey(debugLabel: 'QR');
Barcode? result;
bool sentData = false;
QRViewController? controller;

void sendData(values, isGame) {
Expand Down Expand Up @@ -67,7 +68,8 @@ class _ScanResultsPageState extends State<ScanResultsPage> {
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;
Expand Down

0 comments on commit c9a3684

Please sign in to comment.