Merge branch 'krille/macos-fixes' into 'main'

Krille/macos fixes

See merge request famedly/fluffychat!857
This commit is contained in:
Krille Fear 2022-05-03 15:18:15 +00:00
commit 23652c99be
4 changed files with 14 additions and 17 deletions

View File

@ -8,6 +8,7 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:fluffychat/pages/new_private_chat/new_private_chat_view.dart';
import 'package:fluffychat/pages/new_private_chat/qr_scanner_modal.dart';
import 'package:fluffychat/utils/fluffy_share.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/utils/url_launcher.dart';
import 'package:fluffychat/widgets/matrix.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(

View File

@ -11,16 +11,15 @@ import desktop_drop
import desktop_lifecycle
import device_info_plus_macos
import emoji_picker_flutter
import file_selector_macos
import flutter_local_notifications
import flutter_secure_storage_macos
import flutter_web_auth
import flutter_webrtc
import geolocator_apple
import just_audio
import package_info
import package_info_plus_macos
import path_provider_macos
import share_plus_macos
import shared_preferences_macos
import sqflite
import url_launcher_macos
@ -34,16 +33,15 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DesktopLifecyclePlugin.register(with: registry.registrar(forPlugin: "DesktopLifecyclePlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
EmojiPickerFlutterPlugin.register(with: registry.registrar(forPlugin: "EmojiPickerFlutterPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
FlutterSecureStorageMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageMacosPlugin"))
FlutterWebAuthPlugin.register(with: registry.registrar(forPlugin: "FlutterWebAuthPlugin"))
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))

View File

@ -9,7 +9,6 @@
#include <connectivity_plus_windows/connectivity_plus_windows_plugin.h>
#include <desktop_drop/desktop_drop_plugin.h>
#include <desktop_lifecycle/desktop_lifecycle_plugin.h>
#include <file_selector_windows/file_selector_plugin.h>
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h>
@ -22,8 +21,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("DesktopDropPlugin"));
DesktopLifecyclePluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("DesktopLifecyclePlugin"));
FileSelectorPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorPlugin"));
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
FlutterWebRTCPluginRegisterWithRegistrar(

View File

@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
connectivity_plus_windows
desktop_drop
desktop_lifecycle
file_selector_windows
flutter_secure_storage_windows
flutter_webrtc
permission_handler_windows