Procházet zdrojové kódy

Merge pull request #227 from juliuscanute/204-shapeborder

Updated ShapeBorder to QrScannerOverlayShape
flutter-beta
Julian Steenbakker před 5 roky
committed by GitHub
rodič
revize
e671d8ca95
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 4AEE18F83AFDEB23
1 změnil soubory, kde provedl 4 přidání a 5 odebrání
  1. +4
    -5
      lib/src/qr_code_scanner.dart

+ 4
- 5
lib/src/qr_code_scanner.dart Zobrazit soubor

@@ -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');


Načítá se…
Zrušit
Uložit