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 'dart:io';
|
||||||
|
|
||||||
import 'package:camera_linux/camera_linux.dart';
|
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_controller.dart';
|
||||||
import 'package:camera_macos/camera_macos_device.dart';
|
import 'package:camera_macos/camera_macos_device.dart';
|
||||||
import 'package:camera_macos/camera_macos_platform_interface.dart';
|
import 'package:camera_macos/camera_macos_platform_interface.dart';
|
||||||
|
@ -2054,6 +2055,7 @@ class _QrCodeScannerDialogState extends State<QrCodeScannerDialog> {
|
||||||
throw Exception('No cameras available');
|
throw Exception('No cameras available');
|
||||||
}
|
}
|
||||||
_macOSDeviceId = videoDevices.first.deviceId;
|
_macOSDeviceId = videoDevices.first.deviceId;
|
||||||
|
await CameraMacOS.instance.initialize(cameraMacOSMode: CameraMacOSMode.photo);
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_isCameraOpen = true;
|
_isCameraOpen = true;
|
||||||
|
|
|
@ -32,5 +32,7 @@
|
||||||
<string>QR Code scanning</string>
|
<string>QR Code scanning</string>
|
||||||
<key>NSMicrophoneUsageDescription</key>
|
<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>
|
<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>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
Loading…
Reference in a new issue