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-11-02 17:13:16 +0100
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
GitHub
2024-11-02 17:13:16 +0100
Commit
8e983f1fbdd771a5e59dcd5309f273c39817fe5c
8e983f1f
2 parents
e01fbed5
29dbcc3b
Merge pull request #1230 from IanVS/overlay-example
fix: scanner overlay example
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 @
8e983f1
...
...
@@ -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 @
8e983f1
...
...
@@ -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