From 96082e5330829d17603c899f48381657ff25de47 Mon Sep 17 00:00:00 2001 From: Krille Fear Date: Tue, 30 Nov 2021 19:07:07 +0100 Subject: [PATCH] fix: QR Code scanner in iOS --- lib/pages/new_private_chat/new_private_chat.dart | 3 +-- macos/Flutter/GeneratedPluginRegistrant.swift | 4 ++-- pubspec.lock | 6 +++--- pubspec.yaml | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/pages/new_private_chat/new_private_chat.dart b/lib/pages/new_private_chat/new_private_chat.dart index 6a75175b..4cc1e67f 100644 --- a/lib/pages/new_private_chat/new_private_chat.dart +++ b/lib/pages/new_private_chat/new_private_chat.dart @@ -72,8 +72,7 @@ class NewPrivateChatController extends State { ); void openScannerAction() async { - final status = await Permission.camera.request(); - if (!status.isGranted) return; + await Permission.camera.request(); await showModalBottomSheet( context: context, useRootNavigator: false, diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index e0fad1fa..04c25f83 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,8 +6,8 @@ import FlutterMacOS import Foundation import audioplayers +import desktop_drop import file_selector_macos -import firebase_core import flutter_local_notifications import geolocator_apple import package_info @@ -20,8 +20,8 @@ import wakelock_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AudioplayersPlugin.register(with: registry.registrar(forPlugin: "AudioplayersPlugin")) + DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) - FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin")) FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin")) diff --git a/pubspec.lock b/pubspec.lock index b6c3dbd7..e665d5bb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -993,14 +993,14 @@ packages: name: permission_handler url: "https://pub.dartlang.org" source: hosted - version: "8.1.6" + version: "8.3.0" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.6.1" + version: "3.7.0" petitparser: dependency: transitive description: @@ -1098,7 +1098,7 @@ packages: name: qr_code_scanner url: "https://pub.dartlang.org" source: hosted - version: "0.5.2" + version: "0.6.1" qr_flutter: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 5a06fadf..371f96e5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -53,11 +53,11 @@ dependencies: open_noti_settings: ^0.2.0 package_info_plus: ^1.2.1 path_provider: ^2.0.5 - permission_handler: ^8.1.6 + permission_handler: ^8.3.0 pin_code_text_field: ^1.8.0 provider: ^6.0.1 punycode: ^1.0.0 - qr_code_scanner: ^0.5.2 + qr_code_scanner: ^0.6.1 qr_flutter: ^4.0.0 receive_sharing_intent: ^1.4.5 record: ^3.0.0