Showing
1 changed file
with
4 additions
and
5 deletions
| @@ -212,15 +212,14 @@ class BarcodeOverlay extends CustomPainter { | @@ -212,15 +212,14 @@ class BarcodeOverlay extends CustomPainter { | ||
| 212 | ratioHeight = cameraPreviewSize.height / adjustedSize.destination.height; | 212 | ratioHeight = cameraPreviewSize.height / adjustedSize.destination.height; |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | - final List<Offset> adjustedOffset = []; | ||
| 216 | - for (final offset in barcodeCorners) { | ||
| 217 | - adjustedOffset.add( | 215 | + final List<Offset> adjustedOffset = [ |
| 216 | + for (final offset in barcodeCorners) | ||
| 218 | Offset( | 217 | Offset( |
| 219 | offset.dx / ratioWidth + horizontalPadding, | 218 | offset.dx / ratioWidth + horizontalPadding, |
| 220 | offset.dy / ratioHeight + verticalPadding, | 219 | offset.dy / ratioHeight + verticalPadding, |
| 221 | ), | 220 | ), |
| 222 | - ); | ||
| 223 | - } | 221 | + ]; |
| 222 | + | ||
| 224 | final cutoutPath = Path()..addPolygon(adjustedOffset, true); | 223 | final cutoutPath = Path()..addPolygon(adjustedOffset, true); |
| 225 | 224 | ||
| 226 | final backgroundPaint = Paint() | 225 | final backgroundPaint = Paint() |
-
Please register or login to post a comment