mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 04:25:15 +00:00
fix: Scan QR Code on iOS
This commit is contained in:
parent
916f6536a7
commit
2e09aff56b
1 changed files with 12 additions and 9 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:fluffychat/utils/platform_infos.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:device_info_plus/device_info_plus.dart';
|
import 'package:device_info_plus/device_info_plus.dart';
|
||||||
|
@ -76,16 +77,18 @@ class NewPrivateChatController extends State<NewPrivateChat> {
|
||||||
);
|
);
|
||||||
|
|
||||||
void openScannerAction() async {
|
void openScannerAction() async {
|
||||||
final info = await DeviceInfoPlugin().androidInfo;
|
if (PlatformInfos.isAndroid) {
|
||||||
if ((info.version.sdkInt ?? 16) < 21) {
|
final info = await DeviceInfoPlugin().androidInfo;
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
if ((info.version.sdkInt ?? 16) < 21) {
|
||||||
SnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
content: Text(
|
SnackBar(
|
||||||
L10n.of(context)!.unsupportedAndroidVersionLong,
|
content: Text(
|
||||||
|
L10n.of(context)!.unsupportedAndroidVersionLong,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
return;
|
||||||
return;
|
}
|
||||||
}
|
}
|
||||||
await Permission.camera.request();
|
await Permission.camera.request();
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
|
|
Loading…
Reference in a new issue