From 982cf0bd435638fa20f17ef527fe21d031b5ffaf Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Thu, 6 Jun 2024 08:28:18 +0600 Subject: [PATCH] fix(windows): revert Flutter version to 3.19.6 to avoid distortion #1553 --- .fvm/fvm_config.json | 2 +- .github/workflows/pr-lint.yml | 2 +- .github/workflows/spotube-release-binary.yml | 2 +- lib/main.dart | 22 ++------------------ macos/Podfile.lock | 6 ------ 5 files changed, 5 insertions(+), 29 deletions(-) diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json index df8efa0eb..0b54542ff 100644 --- a/.fvm/fvm_config.json +++ b/.fvm/fvm_config.json @@ -1,4 +1,4 @@ { - "flutterSdkVersion": "3.22.1", + "flutterSdkVersion": "3.19.6", "flavors": {} } \ No newline at end of file diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index 2844986de..64cc8adc4 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -4,7 +4,7 @@ on: pull_request: env: - FLUTTER_VERSION: '3.22.1' + FLUTTER_VERSION: '3.19.6' jobs: lint: diff --git a/.github/workflows/spotube-release-binary.yml b/.github/workflows/spotube-release-binary.yml index 8e68211c6..5e32ee703 100644 --- a/.github/workflows/spotube-release-binary.yml +++ b/.github/workflows/spotube-release-binary.yml @@ -20,7 +20,7 @@ on: description: Dry run without uploading to release env: - FLUTTER_VERSION: 3.22.1 + FLUTTER_VERSION: 3.19.6 permissions: contents: write diff --git a/lib/main.dart b/lib/main.dart index 52d0b1415..30526bc60 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -10,7 +10,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:local_notifier/local_notifier.dart'; import 'package:media_kit/media_kit.dart'; import 'package:metadata_god/metadata_god.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'package:spotube/collections/initializers.dart'; import 'package:spotube/collections/routes.dart'; import 'package:spotube/collections/intents.dart'; @@ -139,28 +138,11 @@ Future main(List rawArgs) async { ); } -class Spotube extends StatefulHookConsumerWidget { +class Spotube extends HookConsumerWidget { const Spotube({super.key}); @override - SpotubeState createState() => SpotubeState(); - - static SpotubeState of(BuildContext context) => - context.findAncestorStateOfType()!; -} - -class SpotubeState extends ConsumerState { - final logger = getLogger(Spotube); - SharedPreferences? localStorage; - - @override - void initState() { - super.initState(); - SharedPreferences.getInstance().then(((value) => localStorage = value)); - } - - @override - Widget build(BuildContext context) { + Widget build(BuildContext context, ref) { final themeMode = ref.watch(userPreferencesProvider.select((s) => s.themeMode)); final accentMaterialColor = diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 166bfa714..fcba29349 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -49,8 +49,6 @@ PODS: - FlutterMacOS - window_manager (0.2.0): - FlutterMacOS - - window_size (0.0.2): - - FlutterMacOS DEPENDENCIES: - app_links (from `Flutter/ephemeral/.symlinks/plugins/app_links/macos`) @@ -76,7 +74,6 @@ DEPENDENCIES: - tray_manager (from `Flutter/ephemeral/.symlinks/plugins/tray_manager/macos`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) - window_manager (from `Flutter/ephemeral/.symlinks/plugins/window_manager/macos`) - - window_size (from `Flutter/ephemeral/.symlinks/plugins/window_size/macos`) SPEC REPOS: trunk: @@ -129,8 +126,6 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos window_manager: :path: Flutter/ephemeral/.symlinks/plugins/window_manager/macos - window_size: - :path: Flutter/ephemeral/.symlinks/plugins/window_size/macos SPEC CHECKSUMS: app_links: 10e0a0ab602ffaf34d142cd4862f29d34b303b2a @@ -157,7 +152,6 @@ SPEC CHECKSUMS: tray_manager: 9064e219c56d75c476e46b9a21182087930baf90 url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95 window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8 - window_size: 339dafa0b27a95a62a843042038fa6c3c48de195 PODFILE CHECKSUM: 0d3963a09fc94f580682bd88480486da345dc3f0