mirror of
https://github.com/DefinedNet/mobile_nebula.git
synced 2025-01-18 03:07:02 +00:00
Fix camera background opacity (#195)
This commit is contained in:
parent
88aab16b52
commit
1102681704
1 changed files with 2 additions and 2 deletions
|
@ -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(
|
||||
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue