Set returnImage to false, because Barcode.corners is now always sent. Remove the…
… optimisation, that's now not needed anymore.
Showing
1 changed file
with
0 additions
and
15 deletions
| @@ -25,12 +25,6 @@ class _BarcodeScannerPicklistState extends State<BarcodeScannerPicklist> { | @@ -25,12 +25,6 @@ class _BarcodeScannerPicklistState extends State<BarcodeScannerPicklist> { | ||
| 25 | final _mobileScannerController = MobileScannerController( | 25 | final _mobileScannerController = MobileScannerController( |
| 26 | // The controller is started from the initState method. | 26 | // The controller is started from the initState method. |
| 27 | autoStart: false, | 27 | autoStart: false, |
| 28 | - // The know the placing of the barcodes, we need to know the size of the | ||
| 29 | - // canvas they are placed on. Unfortunately the only known reliable way | ||
| 30 | - // to get the dimensions, is to receive the complete image from the native | ||
| 31 | - // side. | ||
| 32 | - // https://github.com/juliansteenbakker/mobile_scanner/issues/1183 | ||
| 33 | - returnImage: true, | ||
| 34 | ); | 28 | ); |
| 35 | 29 | ||
| 36 | // On this subscription the barcodes are received. | 30 | // On this subscription the barcodes are received. |
| @@ -45,15 +39,6 @@ class _BarcodeScannerPicklistState extends State<BarcodeScannerPicklist> { | @@ -45,15 +39,6 @@ class _BarcodeScannerPicklistState extends State<BarcodeScannerPicklist> { | ||
| 45 | 39 | ||
| 46 | @override | 40 | @override |
| 47 | void initState() { | 41 | void initState() { |
| 48 | - // Enable and disable scanning on the native side, so we don't get a stream | ||
| 49 | - // of images when not needed. This also improves the behavior (false | ||
| 50 | - // positives) when the user switches quickly to another barcode after | ||
| 51 | - // enabling the scanner by releasing the finger. | ||
| 52 | - _scannerEnabled.addListener(() { | ||
| 53 | - _scannerEnabled.value | ||
| 54 | - ? _mobileScannerController.updateScanWindow(null) | ||
| 55 | - : _mobileScannerController.updateScanWindow(Rect.zero); | ||
| 56 | - }); | ||
| 57 | // Lock to portrait (may not work on iPad with multitasking). | 42 | // Lock to portrait (may not work on iPad with multitasking). |
| 58 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); | 43 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); |
| 59 | // Get a stream subscription and listen to received barcodes. | 44 | // Get a stream subscription and listen to received barcodes. |
-
Please register or login to post a comment