fix: Scan QR Code on iOS

This commit is contained in:
Christian Pauly 2022-05-03 16:31:51 +02:00
parent 3d7a82a8d2
commit e837635f85

View File

@ -1,3 +1,4 @@
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:flutter/material.dart';
import 'package:device_info_plus/device_info_plus.dart';
@ -76,6 +77,7 @@ class NewPrivateChatController extends State<NewPrivateChat> {
);
void openScannerAction() async {
if (PlatformInfos.isAndroid) {
final info = await DeviceInfoPlugin().androidInfo;
if ((info.version.sdkInt ?? 16) < 21) {
ScaffoldMessenger.of(context).showSnackBar(
@ -87,6 +89,7 @@ class NewPrivateChatController extends State<NewPrivateChat> {
);
return;
}
}
await Permission.camera.request();
await showModalBottomSheet(
context: context,