From 159bb3cc8228efb1c4fcfbaa6b84c46834709001 Mon Sep 17 00:00:00 2001 From: Julian Steenbakker Date: Wed, 3 Feb 2021 23:26:50 +0100 Subject: [PATCH] Removed overlay from controller --- lib/src/qr_code_scanner.dart | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/src/qr_code_scanner.dart b/lib/src/qr_code_scanner.dart index db7d2a1..a63fc98 100644 --- a/lib/src/qr_code_scanner.dart +++ b/lib/src/qr_code_scanner.dart @@ -124,9 +124,9 @@ class _QRViewState extends State { _channel = MethodChannel('net.touchcapture.qr.flutterqr/qrview_$id'); // Start scan after creation of the view - final controller = QRViewController._( - _channel, widget.key, widget.overlay, widget.onPermissionSet) - .._startScan(widget.key, widget.overlay, widget.formatsAllowed); + final controller = + QRViewController._(_channel, widget.key, widget.onPermissionSet) + .._startScan(widget.key, widget.overlay, widget.formatsAllowed); // Initialize the controller for controlling the QRView if (widget.onQRViewCreated != null) { @@ -150,7 +150,7 @@ class _QrCameraSettings { } class QRViewController { - QRViewController._(MethodChannel channel, GlobalKey qrKey, QrScannerOverlayShape overlasdfay, + QRViewController._(MethodChannel channel, GlobalKey qrKey, PermissionSetCallback onPermissionSet) : _channel = channel { _channel.setMethodCallHandler((call) async { @@ -205,8 +205,7 @@ class QRViewController { List barcodeFormats) async { // We need to update the dimension before the scan is started. try { - await QRViewController.updateDimensions(key, _channel, - overlay: overlay); + await QRViewController.updateDimensions(key, _channel, overlay: overlay); return await _channel.invokeMethod( 'startScan', barcodeFormats?.map((e) => e.asInt())?.toList() ?? []); } on PlatformException catch (e) {