mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 11:29:23 +00:00
initialize camera on macos
and quiet warning re: NSCameraUseContinuityCameraDeviceType
This commit is contained in:
parent
c708ace18c
commit
cd38a5153b
2 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,7 @@ import 'dart:convert';
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:camera_linux/camera_linux.dart';
|
||||
import 'package:camera_macos/camera_macos_arguments.dart';
|
||||
import 'package:camera_macos/camera_macos_controller.dart';
|
||||
import 'package:camera_macos/camera_macos_device.dart';
|
||||
import 'package:camera_macos/camera_macos_platform_interface.dart';
|
||||
|
@ -2054,6 +2055,7 @@ class _QrCodeScannerDialogState extends State<QrCodeScannerDialog> {
|
|||
throw Exception('No cameras available');
|
||||
}
|
||||
_macOSDeviceId = videoDevices.first.deviceId;
|
||||
await CameraMacOS.instance.initialize(cameraMacOSMode: CameraMacOSMode.photo);
|
||||
|
||||
setState(() {
|
||||
_isCameraOpen = true;
|
||||
|
|
|
@ -32,5 +32,7 @@
|
|||
<string>QR Code scanning</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>QR Code Scanning. A temporary requirement due to limitations in the camera_macos package that are being worked on to remove the need for this permission.</string>
|
||||
<key>NSCameraUseContinuityCameraDeviceType</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Loading…
Reference in a new issue