浏览代码

Draw overlay based on rect position

flutter-beta
Dominik Spicher 6 年前
committed by Dominik Spicher
父节点
当前提交
dd91ed9acb
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      lib/src/qr_scanner_overlay_shape.dart

+ 2
- 2
lib/src/qr_scanner_overlay_shape.dart 查看文件

@@ -87,8 +87,8 @@ class QrScannerOverlayShape extends ShapeBorder {
..blendMode = BlendMode.dstOut;

final cutOutRect = Rect.fromLTWH(
width / 2 - _cutOutSize / 2 + borderOffset,
height / 2 - _cutOutSize / 2 + borderOffset,
rect.left + width / 2 - _cutOutSize / 2 + borderOffset,
rect.top + height / 2 - _cutOutSize / 2 + borderOffset,
_cutOutSize - borderOffset * 2,
_cutOutSize - borderOffset * 2,
);


正在加载...
取消
保存