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
Ian VanSchooten
2024-11-01 10:19:29 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
29dbcc3b5412f28aa9a89f29dd6547e363d79459
29dbcc3b
1 parent
c3271f0c
Fix scanner overlay examples
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
example/lib/barcode_scanner_window.dart
example/lib/mobile_scanner_overlay.dart
example/lib/barcode_scanner_window.dart
View file @
29dbcc3
...
...
@@ -131,15 +131,15 @@ class ScannerOverlay extends CustomPainter {
@override
void
paint
(
Canvas
canvas
,
Size
size
)
{
// TODO: use `Offset.zero & size` instead of Rect.largest
// we need to pass the size to the custom paint widget
final
backgroundPath
=
Path
()..
addRect
(
Rect
.
largest
);
final
backgroundPath
=
Path
()
..
addRect
(
Rect
.
fromLTWH
(
0
,
0
,
size
.
width
,
size
.
height
));
final
cutoutPath
=
Path
()..
addRect
(
scanWindow
);
final
backgroundPaint
=
Paint
()
..
color
=
Colors
.
black
.
withOpacity
(
0.5
)
..
style
=
PaintingStyle
.
fill
..
blendMode
=
BlendMode
.
dstO
ut
;
..
blendMode
=
BlendMode
.
dstO
ver
;
final
backgroundWithCutout
=
Path
.
combine
(
PathOperation
.
difference
,
...
...
example/lib/mobile_scanner_overlay.dart
View file @
29dbcc3
...
...
@@ -102,9 +102,9 @@ class ScannerOverlay extends CustomPainter {
@override
void
paint
(
Canvas
canvas
,
Size
size
)
{
// TODO: use `Offset.zero & size` instead of Rect.largest
// we need to pass the size to the custom paint widget
final
backgroundPath
=
Path
()..
addRect
(
Rect
.
largest
);
final
backgroundPath
=
Path
()
..
addRect
(
Rect
.
fromLTWH
(
0
,
0
,
size
.
width
,
size
.
height
));
final
cutoutPath
=
Path
()
..
addRRect
(
...
...
@@ -120,7 +120,7 @@ class ScannerOverlay extends CustomPainter {
final
backgroundPaint
=
Paint
()
..
color
=
Colors
.
black
.
withOpacity
(
0.5
)
..
style
=
PaintingStyle
.
fill
..
blendMode
=
BlendMode
.
dstO
ut
;
..
blendMode
=
BlendMode
.
dstO
ver
;
final
backgroundWithCutout
=
Path
.
combine
(
PathOperation
.
difference
,
...
...
Please
register
or
login
to post a comment