We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac7ca64 commit e10b7b3Copy full SHA for e10b7b3
example/lib/picklist/classes/barcode_at_center.dart
@@ -1,3 +1,5 @@
1
+import 'dart:io';
2
+
3
import 'package:flutter/material.dart';
4
import 'package:mobile_scanner/mobile_scanner.dart';
5
@@ -7,7 +9,9 @@ import 'package:mobile_scanner/mobile_scanner.dart';
7
9
///
8
10
/// https://github.com/juliansteenbakker/mobile_scanner/issues/1183
11
Barcode? findBarcodeAtCenter(BarcodeCapture barcodeCapture) {
- final imageSize = barcodeCapture.size;
12
+ final imageSize = Platform.isAndroid
13
+ ? Size(barcodeCapture.size.height, barcodeCapture.size.width)
14
+ : barcodeCapture.size;
15
for (final barcode in barcodeCapture.barcodes) {
16
if (_isPolygonTouchingTheCenter(
17
imageSize: imageSize,
0 commit comments