소스 검색

Merge pull request #227 from juliuscanute/204-shapeborder

Updated ShapeBorder to QrScannerOverlayShape
flutter-beta
Julian Steenbakker 5 년 전
committed by GitHub
부모
커밋
e671d8ca95
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. +4
    -5
      lib/src/qr_code_scanner.dart

+ 4
- 5
lib/src/qr_code_scanner.dart 파일 보기

@@ -34,7 +34,7 @@ class QRView extends StatefulWidget {

/// Use [overlay] to provide an overlay for the view.
/// This can be used to create a certain scan area.
final ShapeBorder overlay;
final QrScannerOverlayShape overlay;

/// Use [overlayMargin] to provide a margin to [overlay]
final EdgeInsetsGeometry overlayMargin;
@@ -73,9 +73,8 @@ class _QRViewState extends State<QRView> {
bool onNotification(notification) {
Future.microtask(() => {
QRViewController.updateDimensions(widget.key, _channel,
scanArea: widget.overlay != null
? (widget.overlay as QrScannerOverlayShape).cutOutSize
: 0.0)
scanArea:
widget.overlay != null ? widget.overlay.cutOutSize : 0.0)
});
return false;
}
@@ -126,7 +125,7 @@ class _QRViewState extends State<QRView> {
// We pass the cutout size so that the scanner respects the scan area.
var cutOutSize = 0.0;
if (widget.overlay != null) {
cutOutSize = (widget.overlay as QrScannerOverlayShape).cutOutSize;
cutOutSize = widget.overlay.cutOutSize;
}

_channel = MethodChannel('net.touchcapture.qr.flutterqr/qrview_$id');


불러오는 중...
취소
저장