Skip to content

Commit

Permalink
cd: fix dart@v3 unsupported by generators
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingkor Roy Tirtho committed May 15, 2023
1 parent c9d8156 commit b058517
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/spotube-release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down
4 changes: 4 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions lib/collections/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions lib/hooks/use_progress.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,6 @@ Tuple4<double, Duration, Duration, double> 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,
Expand Down
14 changes: 7 additions & 7 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit b058517

Please sign in to comment.