From 675be0dceecca180b59ee66c85fe8c1059a378c8 Mon Sep 17 00:00:00 2001 From: Julian Steenbakker Date: Tue, 15 Dec 2020 10:19:57 +0100 Subject: [PATCH] Update README.md --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ecbe13c..6050aed 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,20 @@ class _QRViewExampleState extends State { children: [ Expanded( flex: 5, - child: QRView( - key: qrKey, - onQRViewCreated: _onQRViewCreated, + // To ensure the Scanner view is properly sizes after rotation + // we need to listen for Flutter SizeChanged notification and update controller + child: NotificationListener( + onNotification: (notification) { + Future.microtask(() => controller?.updateDimensions(qrKey)); + return false; + }, + child: SizeChangedLayoutNotifier( + key: const Key('qr-size-notifier'), + child: QRView( + key: qrKey, + onQRViewCreated: _onQRViewCreated, + ), + ), ), ), Expanded( @@ -129,7 +140,7 @@ controller.resumeCamera(); # SDK -Requires at least SDK 24 (Android 7.0). +Requires at least SDK 21 (Android 5.0). # TODOs * iOS Native embedding is written to match what is supported in the framework as of the date of publication of this package. It needs to be improved as the framework support improves.