Skip to content

Commit

Permalink
Fix camera background opacity (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanVS authored Oct 31, 2024
1 parent 88aab16 commit 1102681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/screens/siteConfig/ScanQRScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ScannerOverlay extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
// 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(
Expand All @@ -95,7 +95,7 @@ class ScannerOverlay extends CustomPainter {
final backgroundPaint = Paint()
..color = Colors.black.withOpacity(0.5)
..style = PaintingStyle.fill
..blendMode = BlendMode.dstOut;
..blendMode = BlendMode.srcOver;

final backgroundWithCutout = Path.combine(
PathOperation.difference,
Expand Down

0 comments on commit 1102681

Please sign in to comment.