Fix camera background opacity (#195)

This commit is contained in:
Ian VanSchooten 2024-10-31 10:19:32 -04:00 committed by GitHub
parent 88aab16b52
commit 1102681704
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ class ScannerOverlay extends CustomPainter {
@override @override
void paint(Canvas canvas, Size size) { void paint(Canvas canvas, Size size) {
// we need to pass the size to the custom paint widget // 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() final cutoutPath = Path()
..addRRect( ..addRRect(
@ -95,7 +95,7 @@ class ScannerOverlay extends CustomPainter {
final backgroundPaint = Paint() final backgroundPaint = Paint()
..color = Colors.black.withOpacity(0.5) ..color = Colors.black.withOpacity(0.5)
..style = PaintingStyle.fill ..style = PaintingStyle.fill
..blendMode = BlendMode.dstOut; ..blendMode = BlendMode.srcOver;
final backgroundWithCutout = Path.combine( final backgroundWithCutout = Path.combine(
PathOperation.difference, PathOperation.difference,