From 346fe828810bc1d2fbae2af7e03d0f72cb10f385 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Thu, 19 Sep 2024 18:17:51 -0500 Subject: [PATCH] Fix CodeCollector tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit onDetect adds its own listener, but it’s no longer used! --- waydowntown_app/lib/games/code_collector.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waydowntown_app/lib/games/code_collector.dart b/waydowntown_app/lib/games/code_collector.dart index 720723f5..490feac6 100644 --- a/waydowntown_app/lib/games/code_collector.dart +++ b/waydowntown_app/lib/games/code_collector.dart @@ -30,7 +30,6 @@ class CodeCollectorGame extends StatelessWidget { height: 300, child: MobileScanner( controller: (detector as CodeDetector).controller, - onDetect: (capture) {}, ), ), ), @@ -41,6 +40,7 @@ class CodeCollectorGame extends StatelessWidget { class CodeDetector implements StringDetector { final MobileScannerController controller; final _detectedCodesController = StreamController.broadcast(); + StreamSubscription? _barcodesSubscription; CodeDetector(MobileScannerController? scannerController) : controller = scannerController ?? MobileScannerController();