Showing
1 changed file
with
4 additions
and
2 deletions
| @@ -59,7 +59,7 @@ Import `package:mobile_scanner/mobile_scanner.dart`, and use the widget with or | @@ -59,7 +59,7 @@ Import `package:mobile_scanner/mobile_scanner.dart`, and use the widget with or | ||
| 59 | 59 | ||
| 60 | If you don't provide a controller, you can't control functions like the torch(flash) or switching camera. | 60 | If you don't provide a controller, you can't control functions like the torch(flash) or switching camera. |
| 61 | 61 | ||
| 62 | -If you don't set allowDuplicates to false, you can get multiple scans in a very short time, causing things like pop() to fire lots of times. | 62 | +If you don't set `detectionSpeed` to `DetectionSpeed.noDuplicates`, you can get multiple scans in a very short time, causing things like pop() to fire lots of times. |
| 63 | 63 | ||
| 64 | Example without controller: | 64 | Example without controller: |
| 65 | 65 | ||
| @@ -96,7 +96,9 @@ import 'package:mobile_scanner/mobile_scanner.dart'; | @@ -96,7 +96,9 @@ import 'package:mobile_scanner/mobile_scanner.dart'; | ||
| 96 | body: MobileScanner( | 96 | body: MobileScanner( |
| 97 | // fit: BoxFit.contain, | 97 | // fit: BoxFit.contain, |
| 98 | controller: MobileScannerController( | 98 | controller: MobileScannerController( |
| 99 | - facing: CameraFacing.front, torchEnabled: true, | 99 | + detectionSpeed: DetectionSpeed.normal, |
| 100 | + facing: CameraFacing.front, | ||
| 101 | + torchEnabled: true, | ||
| 100 | ), | 102 | ), |
| 101 | onDetect: (capture) { | 103 | onDetect: (capture) { |
| 102 | final List<Barcode> barcodes = capture.barcodes; | 104 | final List<Barcode> barcodes = capture.barcodes; |
-
Please register or login to post a comment