| @@ -34,7 +34,7 @@ class QRView extends StatefulWidget { | |||||
| /// Use [overlay] to provide an overlay for the view. | /// Use [overlay] to provide an overlay for the view. | ||||
| /// This can be used to create a certain scan area. | /// This can be used to create a certain scan area. | ||||
| final ShapeBorder overlay; | |||||
| final QrScannerOverlayShape overlay; | |||||
| /// Use [overlayMargin] to provide a margin to [overlay] | /// Use [overlayMargin] to provide a margin to [overlay] | ||||
| final EdgeInsetsGeometry overlayMargin; | final EdgeInsetsGeometry overlayMargin; | ||||
| @@ -74,7 +74,7 @@ class _QRViewState extends State<QRView> { | |||||
| Future.microtask(() => { | Future.microtask(() => { | ||||
| QRViewController.updateDimensions(widget.key, _channel, | QRViewController.updateDimensions(widget.key, _channel, | ||||
| scanArea: widget.overlay != null | scanArea: widget.overlay != null | ||||
| ? (widget.overlay as QrScannerOverlayShape).cutOutSize | |||||
| ? widget.overlay.cutOutSize | |||||
| : 0.0) | : 0.0) | ||||
| }); | }); | ||||
| return false; | return false; | ||||
| @@ -126,7 +126,7 @@ class _QRViewState extends State<QRView> { | |||||
| // We pass the cutout size so that the scanner respects the scan area. | // We pass the cutout size so that the scanner respects the scan area. | ||||
| var cutOutSize = 0.0; | var cutOutSize = 0.0; | ||||
| if (widget.overlay != null) { | if (widget.overlay != null) { | ||||
| cutOutSize = (widget.overlay as QrScannerOverlayShape).cutOutSize; | |||||
| cutOutSize = widget.overlay.cutOutSize; | |||||
| } | } | ||||
| _channel = MethodChannel('net.touchcapture.qr.flutterqr/qrview_$id'); | _channel = MethodChannel('net.touchcapture.qr.flutterqr/qrview_$id'); | ||||