Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2024-01-29 11:07:18 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
31e913f2d34efa7dff0ed3fa034ff1a7a4b72f9d
31e913f2
1 parent
85c7bd38
use a for literal to eliminate to eliminate a call to add()
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
example/lib/barcode_scanner_window.dart
example/lib/barcode_scanner_window.dart
View file @
31e913f
...
...
@@ -212,15 +212,14 @@ class BarcodeOverlay extends CustomPainter {
ratioHeight
=
cameraPreviewSize
.
height
/
adjustedSize
.
destination
.
height
;
}
final
List
<
Offset
>
adjustedOffset
=
[];
for
(
final
offset
in
barcodeCorners
)
{
adjustedOffset
.
add
(
final
List
<
Offset
>
adjustedOffset
=
[
for
(
final
offset
in
barcodeCorners
)
Offset
(
offset
.
dx
/
ratioWidth
+
horizontalPadding
,
offset
.
dy
/
ratioHeight
+
verticalPadding
,
),
);
}
];
final
cutoutPath
=
Path
()..
addPolygon
(
adjustedOffset
,
true
);
final
backgroundPaint
=
Paint
()
...
...
Please
register
or
login
to post a comment