Committed by
GitHub
Merge pull request #504 from enesbayar/fix-multiple-listener-registiration
fix: Multiple-listener-registiration
Showing
1 changed file
with
1 additions
and
1 deletions
| @@ -123,7 +123,7 @@ class _MobileScannerState extends State<MobileScanner> | @@ -123,7 +123,7 @@ class _MobileScannerState extends State<MobileScanner> | ||
| 123 | return; | 123 | return; |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | - _barcodesSubscription = _controller.barcodes.listen( | 126 | + _barcodesSubscription ??= _controller.barcodes.listen( |
| 127 | widget.onDetect, | 127 | widget.onDetect, |
| 128 | ); | 128 | ); |
| 129 | 129 |
-
Please register or login to post a comment