Skip to content

Commit 807356b

Browse files
committed
[FIX] Replaced dispose call to stopCamera with pauseCamera on iOS 18 as well
1 parent f83ad01 commit 807356b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2.0.12
2+
- For iOS 18 or newer, call `pauseCamera` on dispose instead of `stopCamera`
3+
14
## 2.0.11
25

36
FIX for iOS 26:

lib/src/qr_code_scanner.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ class QRViewController {
298298
final iOSVersionDouble = double.tryParse(iOSVersion) ?? 0;
299299

300300
// print('iOSVersionDouble $iOSVersionDouble');
301-
if (iOSVersionDouble < 26.0) {
302-
// Don't call stopCamera on iOS 26 or higher
303-
// -- it causes UI to hang for a few seconds
301+
if (iOSVersionDouble < 18.0) {
302+
// Don't call stopCamera on iOS 18 or higher
303+
// -- it causes UI to hang for a few seconds, especially on iOS 26+
304304
await _channel.invokeMethod('stopCamera');
305305
} else {
306306
await _channel.invokeMethod('pauseCamera');

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: qr_code_scanner_plus
22
description: QR code scanner that can be embedded inside flutter. It uses zxing in Android and MTBBarcode scanner in iOS.
3-
version: 2.0.11
3+
version: 2.0.12
44
homepage: https://vespr.xyz
55
repository: https://github.com/vespr-wallet/qr_code_scanner_plus
66

0 commit comments

Comments
 (0)