An open-source cross-platform alternative to AirDrop
deps: ensure Windows 7 support
Tien Do Nam0f52e9852da1
diff --git a/lib/util/ui/dynamic_colors.dart b/lib/util/ui/dynamic_colors.dartindex 3c22c125..db0f0b39 100644--- a/lib/util/ui/dynamic_colors.dart+++ b/lib/util/ui/dynamic_colors.dart@@ -1,6 +1,5 @@import 'package:dynamic_color/dynamic_color.dart';import 'package:flutter/material.dart';-import 'package:flutter/services.dart';import 'package:riverpie_flutter/riverpie_flutter.dart';class DynamicColors {@@ -17,6 +16,7 @@ final dynamicColorsProvider = Provider<DynamicColors?>((ref) => throw 'not initi/// Returns the dynamic colors./// A copy of the dynamic_color_plugin implementation to retrieve the dynamic colors without a widget.+/// We need to replace [PlatformException] with a generic exception because on Windows 7 it is somehow not a [PlatformException].Future<DynamicColors?> getDynamicColors() async {try {final corePalette = await DynamicColorPlugin.getCorePalette();@@ -27,7 +27,7 @@ Future<DynamicColors?> getDynamicColors() async {dark: corePalette.toColorScheme(brightness: Brightness.dark),);}- } on PlatformException {+ } catch (e) {debugPrint('dynamic_color: Failed to obtain core palette.');}@@ -46,7 +46,7 @@ Future<DynamicColors?> getDynamicColors() async {),);}- } on PlatformException {+ } catch (e) {debugPrint('dynamic_color: Failed to obtain accent color.');}diff --git a/pubspec.lock b/pubspec.lockindex 6ba8faf5..1d323d0d 100644--- a/pubspec.lock+++ b/pubspec.lock@@ -784,10 +784,11 @@ packages:network_info_plus:dependency: "direct main"description:- name: network_info_plus- sha256: c0113bfd4276be3fe4ba56aeb2792d780df9f3f62aaa4afdd1cdf716b8e29545- url: "https://pub.dev"- source: hosted+ path: "packages/network_info_plus/network_info_plus"+ ref: "646655dd27facd2ac61e9b9557c6f4b0c6b966a9"+ resolved-ref: "646655dd27facd2ac61e9b9557c6f4b0c6b966a9"+ url: "https://github.com/Tienisto/plus_plugins.git"+ source: gitversion: "4.0.2"network_info_plus_platform_interface:dependency: transitive@@ -1591,10 +1592,11 @@ packages:window_manager:dependency: "direct main"description:- name: window_manager- sha256: "9eef00e393e7f9308309ce9a8b2398c9ee3ca78b50c96e8b4f9873945693ac88"- url: "https://pub.dev"- source: hosted+ path: "."+ ref: "159a3ee305bbaf9e03a54b8e5315f76616a64a4a"+ resolved-ref: "159a3ee305bbaf9e03a54b8e5315f76616a64a4a"+ url: "https://github.com/Tienisto/window_manager.git"+ source: gitversion: "0.3.5"xdg_directories:dependency: transitivediff --git a/pubspec.yaml b/pubspec.yamlindex c06e2840..7601235c 100644--- a/pubspec.yaml+++ b/pubspec.yaml@@ -75,12 +75,23 @@ dev_dependencies:test: ^1.24.1dependency_overrides:+ network_info_plus:+ # https://github.com/fluttercommunity/plus_plugins/pull/2101+ git:+ url: https://github.com/Tienisto/plus_plugins.git+ path: packages/network_info_plus/network_info_plus+ ref: 646655dd27facd2ac61e9b9557c6f4b0c6b966a9permission_handler_windows:# Remove windows support as it causes trouble with Windows 7# https://github.com/Baseflow/flutter-permission-handler/issues/1034git:url: https://github.com/localsend/permission_handler_windows_noop.gitref: fc09b707ab4535a9214c87b16f09feda7e765d90+ window_manager:+ # https://github.com/leanflutter/window_manager/pull/388+ git:+ url: https://github.com/Tienisto/window_manager.git+ ref: 159a3ee305bbaf9e03a54b8e5315f76616a64a4aflutter:uses-material-design: true