From 34d8bc26fe83c025f3c01883994b33f88047d0cf Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Mon, 30 Sep 2024 21:53:12 +0600 Subject: [PATCH 1/7] chore: upgrade to Flutter 3.24.3 --- .fvm/fvm_config.json | 3 +- .fvmrc | 4 + .gitignore | 4 +- .vscode/settings.json | 5 +- android/gradle.properties | 2 +- ios/Podfile.lock | 16 +- lib/hooks/configurators/use_deep_linking.dart | 2 +- macos/Podfile.lock | 8 +- macos/Runner/AppDelegate.swift | 2 +- pubspec.lock | 142 +++++++++++------- pubspec.yaml | 14 +- .../flutter/generated_plugin_registrant.cc | 3 + windows/flutter/generated_plugins.cmake | 1 + 13 files changed, 128 insertions(+), 78 deletions(-) create mode 100644 .fvmrc diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json index 160b5b29..305f34df 100644 --- a/.fvm/fvm_config.json +++ b/.fvm/fvm_config.json @@ -1,4 +1,3 @@ { - "flutterSdkVersion": "3.22.3", - "flavors": {} + "flutterSdkVersion": "3.24.3" } \ No newline at end of file diff --git a/.fvmrc b/.fvmrc new file mode 100644 index 00000000..c62692b4 --- /dev/null +++ b/.fvmrc @@ -0,0 +1,4 @@ +{ + "flutter": "3.24.3", + "flavors": {} +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4f9ebc28..f9bd15f8 100644 --- a/.gitignore +++ b/.gitignore @@ -73,8 +73,10 @@ dist appimage-build android/key.properties -.fvm/flutter_sdk **/pb_data tm.json + +# FVM Version Cache +.fvm/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 0ec6ca76..38d74e4e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -25,6 +25,7 @@ "explorer.fileNesting.patterns": { "pubspec.yaml": "pubspec.lock,analysis_options.yaml,.packages,.flutter-plugins,.flutter-plugins-dependencies,flutter_launcher_icons*.yaml,flutter_native_splash*.yaml", "README.md": "LICENSE,CODE_OF_CONDUCT.md,CONTRIBUTING.md,SECURITY.md,CONTRIBUTION.md,CHANGELOG.md,PRIVACY_POLICY.md", - "*.dart": "${capture}.g.dart,${capture}.freezed.dart", - } + "*.dart": "${capture}.g.dart,${capture}.freezed.dart" + }, + "dart.flutterSdkPath": ".fvm/versions/3.24.3" } \ No newline at end of file diff --git a/android/gradle.properties b/android/gradle.properties index 94adc3a3..ed508580 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx4608m android.useAndroidX=true android.enableJetifier=true diff --git a/ios/Podfile.lock b/ios/Podfile.lock index a59f65eb..2d570cbc 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - app_links (0.0.1): + - app_links (0.0.2): - Flutter - audio_service (0.0.1): - Flutter @@ -54,10 +54,10 @@ PODS: - flutter_inappwebview_ios (0.0.1): - Flutter - flutter_inappwebview_ios/Core (= 0.0.1) - - OrderedSet (~> 5.0) + - OrderedSet (~> 6.0.3) - flutter_inappwebview_ios/Core (0.0.1): - Flutter - - OrderedSet (~> 5.0) + - OrderedSet (~> 6.0.3) - flutter_native_splash (0.0.1): - Flutter - flutter_secure_storage (6.0.0): @@ -74,7 +74,7 @@ PODS: - Flutter - metadata_god (0.0.1): - Flutter - - OrderedSet (5.0.0) + - OrderedSet (6.0.3) - package_info_plus (0.4.5): - Flutter - path_provider_foundation (0.0.1): @@ -202,7 +202,7 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/url_launcher_ios/ios" SPEC CHECKSUMS: - app_links: e70ca16b4b0f88253b3b3660200d4a10b4ea9795 + app_links: e7a6750a915a9e161c58d91bc610e8cd1d4d0ad0 audio_service: f509d65da41b9521a61f1c404dd58651f265a567 audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207 bonsoir_darwin: e3b8526c42ca46a885142df84229131dfabea842 @@ -214,16 +214,16 @@ SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_broadcasts: 3ece15b27d8ccbe2132c3df303e7c3401feab882 flutter_discord_rpc: e1c342f29ceb9dd76cdc01db59a70c93bb4d9ec5 - flutter_inappwebview_ios: 97215cf7d4677db55df76782dbd2930c5e1c1ea0 + flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4 flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778 flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be flutter_sharing_intent: e35380d0e1501d7111dbb7e46d5ac6339da6da98 image_picker_ios: b545a5f16c0fa88e3ecbbce3ed4de45567a8ec18 - integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4 + integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 media_kit_libs_ios_audio: 8f39d96a9c630685dfb844c289bd1d114c486fb3 media_kit_native_event_loop: 99111eded5acbdc9c2738021ea6550dd36ca8837 metadata_god: 4bbd8523cdb5d42c5e59d2fabad01ff8f4bc53f9 - OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c + OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 diff --git a/lib/hooks/configurators/use_deep_linking.dart b/lib/hooks/configurators/use_deep_linking.dart index 0bb27a11..ec6d8516 100644 --- a/lib/hooks/configurators/use_deep_linking.dart +++ b/lib/hooks/configurators/use_deep_linking.dart @@ -11,7 +11,7 @@ import 'package:spotube/services/logger/logger.dart'; import 'package:spotube/utils/platform.dart'; final appLinks = AppLinks(); -final linkStream = appLinks.allStringLinkStream.asBroadcastStream(); +final linkStream = appLinks.stringLinkStream.asBroadcastStream(); void useDeepLinking(WidgetRef ref) { // single instance no worries diff --git a/macos/Podfile.lock b/macos/Podfile.lock index b3092d8c..acc50c99 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -18,7 +18,7 @@ PODS: - FlutterMacOS - flutter_inappwebview_macos (0.0.1): - FlutterMacOS - - OrderedSet (~> 5.0) + - OrderedSet (~> 6.0.3) - flutter_secure_storage_macos (6.1.1): - FlutterMacOS - FlutterMacOS (1.0.0) @@ -30,7 +30,7 @@ PODS: - FlutterMacOS - metadata_god (0.0.1): - FlutterMacOS - - OrderedSet (5.0.0) + - OrderedSet (6.0.3) - package_info_plus (0.0.1): - FlutterMacOS - path_provider_foundation (0.0.1): @@ -161,14 +161,14 @@ SPEC CHECKSUMS: device_info_plus: ce1b7762849d3ec103d0e0517299f2db7ad60720 file_selector_macos: 468fb6b81fac7c0e88d71317f3eec34c3b008ff9 flutter_discord_rpc: 67a7c10ea24d9d3bf35d01af643f48fbcfa7c24f - flutter_inappwebview_macos: 9600c9df9fdb346aaa8933812009f8d94304203d + flutter_inappwebview_macos: bdf207b8f4ebd58e86ae06cd96b147de99a67c9b flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 local_notifier: e9506bc66fc70311e8bc7291fb70f743c081e4ff media_kit_libs_macos_audio: 3871782a4f3f84c77f04d7666c87800a781c24da media_kit_native_event_loop: 7321675377cb9ae8596a29bddf3a3d2b5e8792c5 metadata_god: 829f61208b44ac1173e7cd32ab740d8776be5435 - OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c + OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94 package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38 diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift index 218f93e0..a6f73a80 100644 --- a/macos/Runner/AppDelegate.swift +++ b/macos/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return false diff --git a/pubspec.lock b/pubspec.lock index 089563d8..553f0dc9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,34 @@ packages: dependency: "direct main" description: name: app_links - sha256: "42dc15aecf2618ace4ffb74a2e58a50e45cd1b9f2c17c8f0cafe4c297f08c815" + sha256: ad1a6d598e7e39b46a34f746f9a8b011ee147e4c275d407fa457e7a62f84dd99 url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "6.3.2" + app_links_linux: + dependency: transitive + description: + name: app_links_linux + sha256: f5f7173a78609f3dfd4c2ff2c95bd559ab43c80a87dc6a095921d96c05688c81 + url: "https://pub.dev" + source: hosted + version: "1.0.3" + app_links_platform_interface: + dependency: transitive + description: + name: app_links_platform_interface + sha256: "05f5379577c513b534a29ddea68176a4d4802c46180ee8e2e966257158772a3f" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + app_links_web: + dependency: transitive + description: + name: app_links_web + sha256: af060ed76183f9e2b87510a9480e56a5352b6c249778d07bd2c95fc35632a555 + url: "https://pub.dev" + source: hosted + version: "1.0.4" archive: dependency: transitive description: @@ -205,10 +229,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -221,10 +245,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: dd09dd4e2b078992f42aac7f1a622f01882a8492fef08486b27ddde929c19f04 url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.12" build_runner_core: dependency: transitive description: @@ -583,10 +607,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" file: dependency: transitive description: @@ -762,18 +786,18 @@ packages: dependency: "direct main" description: name: flutter_inappwebview - sha256: "3e9a443a18ecef966fb930c3a76ca5ab6a7aafc0c7b5e14a4a850cf107b09959" + sha256: "274edbb07196944e316722d9f6f641c77d0e71261200869887e10f59614c0458" url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "6.1.3" flutter_inappwebview_android: dependency: transitive description: name: flutter_inappwebview_android - sha256: d247f6ed417f1f8c364612fa05a2ecba7f775c8d0c044c1d3b9ee33a6515c421 + sha256: f48203a11c5eb0c23dd5a3cb3638ae678056b6ceae22819373e36c6cb4f1d46a url: "https://pub.dev" source: hosted - version: "1.0.13" + version: "1.1.1" flutter_inappwebview_internal_annotations: dependency: transitive description: @@ -786,34 +810,42 @@ packages: dependency: transitive description: name: flutter_inappwebview_ios - sha256: f363577208b97b10b319cd0c428555cd8493e88b468019a8c5635a0e4312bd0f + sha256: f6f88d464b38f2fc1c5f2ae74024498115eb1470715bd8b40f902dd4ac99ccc8 url: "https://pub.dev" source: hosted - version: "1.0.13" + version: "1.1.1" flutter_inappwebview_macos: dependency: transitive description: name: flutter_inappwebview_macos - sha256: b55b9e506c549ce88e26580351d2c71d54f4825901666bd6cfa4be9415bb2636 + sha256: "68e0c3785d8d789710cda7d7efe6effa337c91bf300dd28af7efc2d358fa1a98" url: "https://pub.dev" source: hosted - version: "1.0.11" + version: "1.1.1" flutter_inappwebview_platform_interface: dependency: transitive description: name: flutter_inappwebview_platform_interface - sha256: "545fd4c25a07d2775f7d5af05a979b2cac4fbf79393b0a7f5d33ba39ba4f6187" + sha256: "97b4ab116d949ede20c90c7e3d15d24afaf1b706cc0af96b060770293cd6c49d" url: "https://pub.dev" source: hosted - version: "1.0.10" + version: "1.2.0" flutter_inappwebview_web: dependency: transitive description: name: flutter_inappwebview_web - sha256: d8c680abfb6fec71609a700199635d38a744df0febd5544c5a020bd73de8ee07 + sha256: f7f97b6faa39416e4e86da1184edd4de6c27b271d036f0838ea3ff9a250a1de2 url: "https://pub.dev" source: hosted - version: "1.0.8" + version: "1.1.1" + flutter_inappwebview_windows: + dependency: transitive + description: + name: flutter_inappwebview_windows + sha256: "86702d2109384311f8ea634855e90ee143b9bfabddd3858696d905a2c28808aa" + url: "https://pub.dev" + source: hosted + version: "0.4.0" flutter_launcher_icons: dependency: "direct dev" description: @@ -1259,18 +1291,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -1331,10 +1363,10 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" media_kit: dependency: "direct main" description: @@ -1411,10 +1443,10 @@ packages: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" metadata_god: dependency: "direct main" description: @@ -1620,10 +1652,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -1861,10 +1893,10 @@ packages: dependency: "direct main" description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" shortid: dependency: transitive description: @@ -2091,10 +2123,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" time: dependency: transitive description: @@ -2251,10 +2283,10 @@ packages: dependency: "direct main" description: name: uuid - sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.5.1" vector_math: dependency: transitive description: @@ -2291,10 +2323,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.5" watcher: dependency: transitive description: @@ -2304,21 +2336,29 @@ packages: source: hosted version: "1.1.0" web: - dependency: transitive + dependency: "direct overridden" description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" web_socket_channel: dependency: "direct main" description: name: web_socket_channel - sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "3.0.1" webdriver: dependency: transitive description: @@ -2339,18 +2379,18 @@ packages: dependency: transitive description: name: win32 - sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.5.4" win32_registry: dependency: "direct main" description: name: win32_registry - sha256: "10589e0d7f4e053f2c61023a31c9ce01146656a70b7b7f0828c0b46d7da2a9bb" + sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852" url: "https://pub.dev" source: hosted - version: "1.1.3" + version: "1.1.5" window_manager: dependency: "direct main" description: @@ -2387,10 +2427,10 @@ packages: dependency: "direct main" description: name: youtube_explode_dart - sha256: "26c9671d638f3396a1bfb2666f586988ee7b0ba3469e478b22a4c1a168bcf6ee" + sha256: "133a65907e6cf839ac7643d92dc5c56b37fcebe4f0a8f0e67716dffa500c0ef0" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.2" sdks: - dart: ">=3.4.0 <4.0.0" - flutter: ">=3.19.2" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index e0c51cc5..6f5019a2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,7 +21,7 @@ dependencies: auto_size_text: ^3.0.0 buttons_tabbar: ^1.3.8 cached_network_image: ^3.3.1 - collection: ^1.15.0 + collection: ^1.18.0 curved_navigation_bar: ^1.0.3 desktop_webview_window: git: @@ -42,7 +42,7 @@ dependencies: flutter_displaymode: ^0.6.0 flutter_feather_icons: ^2.0.0+1 flutter_hooks: ^0.20.5 - flutter_inappwebview: ^6.0.0 + flutter_inappwebview: ^6.1.3 flutter_localizations: sdk: flutter flutter_native_splash: ^2.4.0 @@ -113,8 +113,8 @@ dependencies: html_unescape: ^2.0.0 wikipedia_api: ^0.1.0 skeletonizer: ^1.1.1 - app_links: ^4.0.1 - win32_registry: ^1.1.3 + app_links: ^6.3.2 + win32_registry: ^1.1.5 flutter_sharing_intent: ^1.1.0 flutter_broadcasts: ^0.4.0 freezed_annotation: ^2.4.1 @@ -122,8 +122,8 @@ dependencies: bonsoir: ^5.1.10 shelf: ^1.4.1 shelf_router: ^1.1.4 - shelf_web_socket: ^1.0.4 - web_socket_channel: ^2.4.5 + shelf_web_socket: ^2.0.0 + web_socket_channel: ^3.0.1 lrc: ^1.0.2 timezone: ^0.9.2 local_notifier: ^0.1.6 @@ -160,7 +160,7 @@ dev_dependencies: drift_dev: ^2.18.0 dependency_overrides: - uuid: ^4.4.0 + web: ^1.1.0 flutter: generate: true diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index f2d60e21..c10169b1 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -30,6 +31,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("DesktopWebviewWindowPlugin")); FileSelectorWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("FileSelectorWindows")); + FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi")); FlutterSecureStorageWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); LocalNotifierPluginRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index bea4d801..7cb17288 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST bonsoir_windows desktop_webview_window file_selector_windows + flutter_inappwebview_windows flutter_secure_storage_windows local_notifier media_kit_libs_windows_audio From 58f6142d2fbce2980449c581d463dba718bdd718 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Wed, 9 Oct 2024 11:38:48 +0600 Subject: [PATCH 2/7] chore: add fvm local flutter symlink in vscode settings --- .vscode/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 38d74e4e..11fae610 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -27,5 +27,5 @@ "README.md": "LICENSE,CODE_OF_CONDUCT.md,CONTRIBUTING.md,SECURITY.md,CONTRIBUTION.md,CHANGELOG.md,PRIVACY_POLICY.md", "*.dart": "${capture}.g.dart,${capture}.freezed.dart" }, - "dart.flutterSdkPath": ".fvm/versions/3.24.3" + "dart.flutterSdkPath": ".fvm/flutter_sdk" } \ No newline at end of file From 4e0de13075b804e432c9d48ba06ecdb98d5f9cd8 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Wed, 9 Oct 2024 11:55:32 +0600 Subject: [PATCH 3/7] cd: upgrade flutter version --- .github/workflows/spotube-release-binary.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spotube-release-binary.yml b/.github/workflows/spotube-release-binary.yml index 19fbac82..d059a067 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.3 + FLUTTER_VERSION: 3.24.3 permissions: contents: write From 70bbb4af5abb4043cef82c4364269eee1d392f58 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Wed, 9 Oct 2024 14:45:16 +0600 Subject: [PATCH 4/7] feat(macos): enable same window webview support --- .../mobile_login/hooks/login_callback.dart | 2 +- lib/pages/mobile_login/mobile_login.dart | 78 ++++++++++--------- 2 files changed, 42 insertions(+), 38 deletions(-) diff --git a/lib/pages/mobile_login/hooks/login_callback.dart b/lib/pages/mobile_login/hooks/login_callback.dart index 1648da19..07c0210a 100644 --- a/lib/pages/mobile_login/hooks/login_callback.dart +++ b/lib/pages/mobile_login/hooks/login_callback.dart @@ -19,7 +19,7 @@ Future Function() useLoginCallback(WidgetRef ref) { final authNotifier = ref.read(authenticationProvider.notifier); return useCallback(() async { - if (kIsMobile) { + if (kIsMobile || kIsMacOS) { context.pushNamed(WebViewLogin.name); return; } diff --git a/lib/pages/mobile_login/mobile_login.dart b/lib/pages/mobile_login/mobile_login.dart index 10a989cf..c45c2184 100644 --- a/lib/pages/mobile_login/mobile_login.dart +++ b/lib/pages/mobile_login/mobile_login.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:spotube/components/titlebar/titlebar.dart'; import 'package:spotube/provider/authentication/authentication.dart'; import 'package:spotube/utils/platform.dart'; @@ -23,44 +24,47 @@ class WebViewLogin extends HookConsumerWidget { } return Scaffold( - body: SafeArea( - child: InAppWebView( - initialSettings: InAppWebViewSettings( - userAgent: - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 safari/537.36", - ), - initialUrlRequest: URLRequest( - url: WebUri("https://accounts.spotify.com/"), - ), - onPermissionRequest: (controller, permissionRequest) async { - return PermissionResponse( - resources: permissionRequest.resources, - action: PermissionResponseAction.GRANT, - ); - }, - onLoadStop: (controller, action) async { - if (action == null) return; - String url = action.toString(); - if (url.endsWith("/")) { - url = url.substring(0, url.length - 1); - } - - final exp = RegExp(r"https:\/\/accounts.spotify.com\/.+\/status"); - - if (exp.hasMatch(url)) { - final cookies = - await CookieManager.instance().getCookies(url: action); - final cookieHeader = - "sp_dc=${cookies.firstWhere((element) => element.name == "sp_dc").value}"; - - await authenticationNotifier.login(cookieHeader); - if (context.mounted) { - // ignore: use_build_context_synchronously - GoRouter.of(context).go("/"); - } - } - }, + appBar: const PageWindowTitleBar( + leading: BackButton(color: Colors.white), + backgroundColor: Colors.transparent, + ), + extendBodyBehindAppBar: true, + body: InAppWebView( + initialSettings: InAppWebViewSettings( + userAgent: + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 safari/537.36", ), + initialUrlRequest: URLRequest( + url: WebUri("https://accounts.spotify.com/"), + ), + onPermissionRequest: (controller, permissionRequest) async { + return PermissionResponse( + resources: permissionRequest.resources, + action: PermissionResponseAction.GRANT, + ); + }, + onLoadStop: (controller, action) async { + if (action == null) return; + String url = action.toString(); + if (url.endsWith("/")) { + url = url.substring(0, url.length - 1); + } + + final exp = RegExp(r"https:\/\/accounts.spotify.com\/.+\/status"); + + if (exp.hasMatch(url)) { + final cookies = + await CookieManager.instance().getCookies(url: action); + final cookieHeader = + "sp_dc=${cookies.firstWhere((element) => element.name == "sp_dc").value}"; + + await authenticationNotifier.login(cookieHeader); + if (context.mounted) { + // ignore: use_build_context_synchronously + GoRouter.of(context).go("/"); + } + } + }, ), ); } From a76b5c4c7fc7479b4d27c4b7c100cf3f3e9b0f08 Mon Sep 17 00:00:00 2001 From: Xavi Fortes <53091080+XaviFortes@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:47:11 +0200 Subject: [PATCH 5/7] fix: update youtube_explode_dart to 2.2.3 to fix no playback (#1980) * chore: update bug reports template * chore: update bug reports template * Update youtube_explode_dart to 2.2.3 fixes 403 --------- Co-authored-by: Kingkor Roy Tirtho --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 3b1bd826..6560a450 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -95,7 +95,7 @@ dependencies: version: ^3.0.2 visibility_detector: ^0.4.0+2 window_manager: ^0.3.9 - youtube_explode_dart: ^2.2.2 + youtube_explode_dart: ^2.2.3 simple_icons: ^10.1.3 jiosaavn: ^0.1.0 draggable_scrollbar: From fdde972a775897b131199b9512a32c76c2946787 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Wed, 9 Oct 2024 14:51:24 +0600 Subject: [PATCH 6/7] chore: bump version to 3.8.3 and generate changelogs --- .github/workflows/spotube-publish-binary.yml | 2 +- CHANGELOG.md | 14 +++++++++++++- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/spotube-publish-binary.yml b/.github/workflows/spotube-publish-binary.yml index 3153c279..3a456bda 100644 --- a/.github/workflows/spotube-publish-binary.yml +++ b/.github/workflows/spotube-publish-binary.yml @@ -4,7 +4,7 @@ on: inputs: version: description: Version to publish (x.x.x) - default: 3.8.2 + default: 3.8.3 required: true dry_run: description: Dry run diff --git a/CHANGELOG.md b/CHANGELOG.md index 8297a7c4..11b06ed0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,19 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -## [3.8.2](https://github.com/krtirtho/spotube/compare/v3.8.0...v3.8.1) (2024-09-30) +## [3.8.3](https://github.com/krtirtho/spotube/compare/v3.8.2...v3.8.3) (2024-10-09) + +## Changes + +### Bug Fixes + +- update youtube_explode_dart to 2.2.3 to fix no playback (#1980) + +### Features + +- **macos**: enable same window webview support + +## [3.8.2](https://github.com/krtirtho/spotube/compare/v3.8.1...v3.8.2) (2024-09-30) ## Changes diff --git a/pubspec.lock b/pubspec.lock index 553f0dc9..77193ca0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -2427,10 +2427,10 @@ packages: dependency: "direct main" description: name: youtube_explode_dart - sha256: "133a65907e6cf839ac7643d92dc5c56b37fcebe4f0a8f0e67716dffa500c0ef0" + sha256: "28dca07fefb4b6518beab95f0c1ef81031f921ed0fe87ebcd9c51378546edfee" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" sdks: dart: ">=3.5.0 <4.0.0" flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index 6560a450..571f6011 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Open source Spotify client that doesn't require Premium nor uses El publish_to: "none" -version: 3.8.2+35 +version: 3.8.3+36 homepage: https://spotube.krtirtho.dev repository: https://github.com/KRTirtho/spotube From f553e43b1734c6c455b838884f542684b4925b76 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Wed, 9 Oct 2024 16:37:41 +0600 Subject: [PATCH 7/7] chore: hide donations link for playstore version to adhere with Google Play's iae policy This commit keeps food on one google PM's table by not stealing their 30% pay cut --- .env.example | 2 + cli/commands/build/android.dart | 3 +- lib/collections/assets.gen.dart | 3 + lib/collections/env.dart | 7 +- .../getting_started/sections/support.dart | 31 ++++---- lib/pages/settings/sections/about.dart | 76 ++++++++++--------- 6 files changed, 69 insertions(+), 53 deletions(-) diff --git a/.env.example b/.env.example index 56665663..6a88cb99 100644 --- a/.env.example +++ b/.env.example @@ -12,3 +12,5 @@ LASTFM_API_SECRET= # Release channel. Can be: nightly, stable RELEASE_CHANNEL= + +HIDE_DONATIONS= diff --git a/cli/commands/build/android.dart b/cli/commands/build/android.dart index 800522b8..fe2db2e2 100644 --- a/cli/commands/build/android.dart +++ b/cli/commands/build/android.dart @@ -25,7 +25,8 @@ class AndroidBuildCommand extends Command with BuildCommandCommonSteps { ); await dotEnvFile.writeAsString( - "\nENABLE_UPDATE_CHECK=0", + "\nENABLE_UPDATE_CHECK=0" + "\nHIDE_DONATIONS=1", mode: FileMode.append, ); diff --git a/lib/collections/assets.gen.dart b/lib/collections/assets.gen.dart index 2a30260b..cff5b74f 100644 --- a/lib/collections/assets.gen.dart +++ b/lib/collections/assets.gen.dart @@ -59,6 +59,8 @@ class Assets { AssetGenImage('assets/spotube-hero-banner.png'); static const AssetGenImage spotubeLogoForeground = AssetGenImage('assets/spotube-logo-foreground.jpg'); + static const AssetGenImage spotubeLogoBmp = + AssetGenImage('assets/spotube-logo.bmp'); static const String spotubeLogoIco = 'assets/spotube-logo.ico'; static const AssetGenImage spotubeLogoPng = AssetGenImage('assets/spotube-logo.png'); @@ -98,6 +100,7 @@ class Assets { placeholder, spotubeHeroBanner, spotubeLogoForeground, + spotubeLogoBmp, spotubeLogoIco, spotubeLogoPng, spotubeLogoSvg, diff --git a/lib/collections/env.dart b/lib/collections/env.dart index df45cee9..eb60851f 100644 --- a/lib/collections/env.dart +++ b/lib/collections/env.dart @@ -19,6 +19,11 @@ abstract class Env { @EnviedField(varName: 'LASTFM_API_SECRET') static final String lastFmApiSecret = _Env.lastFmApiSecret; + @EnviedField(varName: 'HIDE_DONATIONS', defaultValue: "0") + static final int _hideDonations = _Env._hideDonations; + + static bool get hideDonations => _hideDonations == 1; + static final spotifySecrets = rawSpotifySecrets.split(',').map((e) { final secrets = e.trim().split(":").map((e) => e.trim()); return { @@ -41,4 +46,4 @@ abstract class Env { kIsFlatpak || _enableUpdateChecker == "1"; static String discordAppId = "1176718791388975124"; -} \ No newline at end of file +} diff --git a/lib/pages/getting_started/sections/support.dart b/lib/pages/getting_started/sections/support.dart index 3f669557..f09a585d 100644 --- a/lib/pages/getting_started/sections/support.dart +++ b/lib/pages/getting_started/sections/support.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:spotube/collections/env.dart'; import 'package:spotube/collections/spotube_icons.dart'; import 'package:spotube/modules/getting_started/blur_card.dart'; import 'package:spotube/extensions/context.dart'; @@ -62,21 +63,23 @@ class GettingStartedScreenSupportSection extends HookConsumerWidget { ); }, ), - const Gap(16), - FilledButton.icon( - icon: const Icon(SpotubeIcons.openCollective), - label: Text(context.l10n.donate_on_open_collective), - style: FilledButton.styleFrom( - backgroundColor: const Color(0xff4cb7f6), - foregroundColor: Colors.white, + if (!Env.hideDonations) ...[ + const Gap(16), + FilledButton.icon( + icon: const Icon(SpotubeIcons.openCollective), + label: Text(context.l10n.donate_on_open_collective), + style: FilledButton.styleFrom( + backgroundColor: const Color(0xff4cb7f6), + foregroundColor: Colors.white, + ), + onPressed: () async { + await launchUrlString( + "https://opencollective.com/spotube", + mode: LaunchMode.externalApplication, + ); + }, ), - onPressed: () async { - await launchUrlString( - "https://opencollective.com/spotube", - mode: LaunchMode.externalApplication, - ); - }, - ), + ] ], ), ], diff --git a/lib/pages/settings/sections/about.dart b/lib/pages/settings/sections/about.dart index dfb5272b..a0a5bf30 100644 --- a/lib/pages/settings/sections/about.dart +++ b/lib/pages/settings/sections/about.dart @@ -21,48 +21,50 @@ class SettingsAboutSection extends HookConsumerWidget { return SectionCardWithHeading( heading: context.l10n.about, children: [ - AdaptiveListTile( - leading: const Icon( - SpotubeIcons.heart, - color: Colors.pink, - ), - title: SizedBox( - height: 50, - width: 200, - child: Align( - alignment: Alignment.centerLeft, - child: AutoSizeText( - context.l10n.u_love_spotube, - maxLines: 1, - style: const TextStyle( - color: Colors.pink, - fontWeight: FontWeight.bold, + if (!Env.hideDonations) + AdaptiveListTile( + leading: const Icon( + SpotubeIcons.heart, + color: Colors.pink, + ), + title: SizedBox( + height: 50, + width: 200, + child: Align( + alignment: Alignment.centerLeft, + child: AutoSizeText( + context.l10n.u_love_spotube, + maxLines: 1, + style: const TextStyle( + color: Colors.pink, + fontWeight: FontWeight.bold, + ), ), ), ), - ), - trailing: (context, update) => FilledButton( - style: ButtonStyle( - backgroundColor: WidgetStatePropertyAll(Colors.red[100]), - foregroundColor: const WidgetStatePropertyAll(Colors.pinkAccent), - padding: const WidgetStatePropertyAll(EdgeInsets.all(15)), - ), - onPressed: () { - launchUrlString( - "https://opencollective.com/spotube", - mode: LaunchMode.externalApplication, - ); - }, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(SpotubeIcons.heart), - const SizedBox(width: 5), - Text(context.l10n.please_sponsor), - ], + trailing: (context, update) => FilledButton( + style: ButtonStyle( + backgroundColor: WidgetStatePropertyAll(Colors.red[100]), + foregroundColor: + const WidgetStatePropertyAll(Colors.pinkAccent), + padding: const WidgetStatePropertyAll(EdgeInsets.all(15)), + ), + onPressed: () { + launchUrlString( + "https://opencollective.com/spotube", + mode: LaunchMode.externalApplication, + ); + }, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + const Icon(SpotubeIcons.heart), + const SizedBox(width: 5), + Text(context.l10n.please_sponsor), + ], + ), ), ), - ), if (Env.enableUpdateChecker) SwitchListTile( secondary: const Icon(SpotubeIcons.update),