mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-23 22:12:34 +01:00
fix: Scan QR Code on iOS
This commit is contained in:
parent
3d7a82a8d2
commit
e837635f85
@ -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,16 +77,18 @@ class NewPrivateChatController extends State<NewPrivateChat> {
|
||||
);
|
||||
|
||||
void openScannerAction() async {
|
||||
final info = await DeviceInfoPlugin().androidInfo;
|
||||
if ((info.version.sdkInt ?? 16) < 21) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
L10n.of(context)!.unsupportedAndroidVersionLong,
|
||||
if (PlatformInfos.isAndroid) {
|
||||
final info = await DeviceInfoPlugin().androidInfo;
|
||||
if ((info.version.sdkInt ?? 16) < 21) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
L10n.of(context)!.unsupportedAndroidVersionLong,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
return;
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
await Permission.camera.request();
|
||||
await showModalBottomSheet(
|
||||
|
Loading…
Reference in New Issue
Block a user