diff --git a/.github/workflows/spotube-release-binary.yml b/.github/workflows/spotube-release-binary.yml index 774429c03..74d4e4558 100644 --- a/.github/workflows/spotube-release-binary.yml +++ b/.github/workflows/spotube-release-binary.yml @@ -65,7 +65,7 @@ jobs: run: | flutter config --enable-windows-desktop flutter pub get - flutter pub run build_runner build --delete-conflicting-outputs + dart run build_runner build --delete-conflicting-outputs --enable-experiment=records,patterns - name: Build Windows Executable run: | @@ -141,7 +141,7 @@ jobs: run: | flutter config --enable-linux-desktop flutter pub get - flutter pub run build_runner build --delete-conflicting-outputs + dart run build_runner build --delete-conflicting-outputs --enable-experiment=records,patterns - name: Build Linux Packages run: | @@ -209,7 +209,7 @@ jobs: - name: Generate Secrets run: | flutter pub get - flutter pub run build_runner build --delete-conflicting-outputs + dart run build_runner build --delete-conflicting-outputs --enable-experiment=records,patterns - name: Sign Apk run: | @@ -260,7 +260,7 @@ jobs: - name: Generate Secrets run: | flutter pub get - flutter pub run build_runner build --delete-conflicting-outputs + dart run build_runner build --delete-conflicting-outputs --enable-experiment=records,patterns - name: Build Macos App run: | diff --git a/analysis_options.yaml b/analysis_options.yaml index d1b7c95f0..4f0718e45 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -28,3 +28,7 @@ linter: # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options +analyzer: + enable-experiment: + - records + - patterns \ No newline at end of file diff --git a/lib/collections/assets.gen.dart b/lib/collections/assets.gen.dart index 3c8530e2b..fdccd7ca1 100644 --- a/lib/collections/assets.gen.dart +++ b/lib/collections/assets.gen.dart @@ -30,6 +30,9 @@ class Assets { static const AssetGenImage albumPlaceholder = AssetGenImage('assets/album-placeholder.png'); + static const AssetGenImage bengaliPatternsBg = + AssetGenImage('assets/bengali-patterns-bg.jpg'); + static const AssetGenImage branding = AssetGenImage('assets/branding.png'); static const AssetGenImage emptyBox = AssetGenImage('assets/empty_box.png'); static const AssetGenImage placeholder = AssetGenImage('assets/placeholder.png'); @@ -39,6 +42,8 @@ class Assets { static const AssetGenImage spotubeLogoPng = AssetGenImage('assets/spotube-logo.png'); static const String spotubeLogoSvg = 'assets/spotube-logo.svg'; + static const AssetGenImage spotubeLogoAndroid12 = + AssetGenImage('assets/spotube-logo_android12.png'); static const AssetGenImage spotubeScreenshot = AssetGenImage('assets/spotube-screenshot.jpg'); static const AssetGenImage spotubeBanner = @@ -51,12 +56,15 @@ class Assets { /// List of all assets List get values => [ albumPlaceholder, + bengaliPatternsBg, + branding, emptyBox, placeholder, spotubeLogoForeground, spotubeLogoIco, spotubeLogoPng, spotubeLogoSvg, + spotubeLogoAndroid12, spotubeScreenshot, spotubeBanner, success, diff --git a/lib/hooks/use_progress.dart b/lib/hooks/use_progress.dart index 47841c92d..cf674febd 100644 --- a/lib/hooks/use_progress.dart +++ b/lib/hooks/use_progress.dart @@ -26,19 +26,6 @@ Tuple4 useProgress(WidgetRef ref) { final sliderMax = duration.inSeconds; final sliderValue = position.inSeconds; - // this is a hack to fix duration not being updated - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((_) async { - if (positionSnapshot.hasData && duration == Duration.zero) { - await Future.delayed(const Duration(milliseconds: 200)); - await audioPlayer.pause(); - await Future.delayed(const Duration(milliseconds: 400)); - await audioPlayer.resume(); - } - }); - return null; - }, [positionSnapshot.hasData, duration]); - return Tuple4( sliderMax == 0 || sliderValue > sliderMax ? 0 : sliderValue / sliderMax, position, diff --git a/pubspec.lock b/pubspec.lock index 57a031e29..96ee45281 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -454,18 +454,18 @@ packages: dependency: "direct main" description: name: envied - sha256: d5d978fbd578b5c00123003609c39185e0b1ddf9d2ac460d710dd0eb2fc223d7 + sha256: "60d3f5606c7b35bc6ef493e650d916b34351d8af2e58b7ac45881ba59dfcf039" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.3.0+3" envied_generator: dependency: "direct dev" description: name: envied_generator - sha256: "6c5a98c27c5eae925807692eb252ccac2b8e81f09bace1f07207c47dfb6a4eb0" + sha256: dfdbe5dc52863e54c036a4c4042afbdf1bd528cb4c1e638ecba26228ba72e9e5 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.3.0+3" fake_async: dependency: transitive description: @@ -935,13 +935,13 @@ packages: source: hosted version: "4.8.1" json_serializable: - dependency: "direct main" + dependency: "direct dev" description: name: json_serializable - sha256: dadc08bd61f72559f938dd08ec20dbfec6c709bba83515085ea943d2078d187a + sha256: "43793352f90efa5d8b251893a63d767b2f7c833120e3cc02adad55eefec04dc7" url: "https://pub.dev" source: hosted - version: "6.6.1" + version: "6.6.2" just_audio: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 7547eec2e..8b9469bfa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,6 +7,7 @@ version: 2.7.1+18 environment: sdk: ">=3.0.0 <4.0.0" + flutter: ">=3.10.0" dependencies: args: ^2.3.2 @@ -53,8 +54,7 @@ dependencies: http: ^0.13.5 intl: ^0.18.0 introduction_screen: ^3.0.2 - json_annotation: ^4.8.0 - json_serializable: ^6.6.0 + json_annotation: ^4.8.1 just_audio: ^0.9.32 logger: ^1.1.0 media_kit: ^0.0.7+1 @@ -105,7 +105,7 @@ dependencies: dev_dependencies: build_runner: ^2.3.2 - envied_generator: ^0.3.0 + envied_generator: ^0.3.0+3 flutter_distributor: ^0.0.2 flutter_gen_runner: ^5.1.0+1 flutter_launcher_icons: ^0.13.1 @@ -115,6 +115,7 @@ dev_dependencies: integration_test: sdk: flutter hive_generator: ^2.0.0 + json_serializable: ^6.6.2 pub_api_client: ^2.4.0 pubspec_parse: ^1.2.2