jhomlala / betterplayer

Better video player for Flutter, with multiple configuration options. Solving typical use cases!
Apache License 2.0
889 stars 929 forks source link

visibility_detector Dependency conflicts [BUG] #1283

Open amalshyjo opened 6 months ago

amalshyjo commented 6 months ago

History check Please confirm that you've checked issues history and you didn't find anything which may solve your issue.

Describe the bug visibility_detector package used by betterplayer is 0.3.3 but most packages have updated to 0.4.0+2 causing dependency conflicts with multiple packages like UX Cam, etc...

To Reproduce Steps to reproduce the behavior:

  1. Go to you flutter project and increase visibility_detector version from 0.3.3 to 0.4.0+2
  2. Run flutter pub get
  3. The package getter will fail with Dependency conflicts issue where there are multiple apps with support for 0.4.0+2 causing the packages unusable
  4. ecause better_player >=0.0.62 <0.0.68 depends on visibility_detector ^0.2.0-nullsafety.1 and better_player >=0.0.68 <0.0.80 depends on visibility_detector ^0.2.0, better_player >=0.0.62 <0.0.80 requires visibility_detector ^0.2.0-nullsafety.1. And because better_player >=0.0.80 <0.0.83 depends on visibility_detector ^0.2.2 and better_player >=0.0.83 depends on visibility_detector ^0.3.3, better_player >=0.0.62 requires visibility_detector ^0.2.0-nullsafety.1 or ^0.3.3.

*Example code better_player: ^0.0.66 visibility_detector: ^0.4.0+2

Expected behavior Need to update betterplayer package to use visibility_detector: ^0.4.0+2

Screenshots If applicable, add screenshots to help explain your problem.

Flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.7.8, on macOS 13.0.1 22A400 darwin-arm64, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.85.1) [✓] Connected device (2 available) ! Error: Browsing for AKHILA’s iPhone (CoreDevice) on the local area network. Ensure that the device is booted, unlocked, and discoverable via Bluetooth and WiFi, or attached with a cable. (code -27) [✓] HTTP Host Availability

• No issues found!

Better Player version

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

amalshyjo commented 6 months ago

fixed #1284

fabioselau077 commented 5 months ago

same with flutter_secure_storage package...


Because no versions of flutter_secure_storage match >9.0.0 <10.0.0 and flutter_secure_storage 9.0.0 depends on flutter_secure_storage_windows ^3.0.0, flutter_secure_storage ^9.0.0 requires flutter_secure_storage_windows ^3.0.0.
And because no versions of flutter_secure_storage_windows match >3.0.0 <4.0.0 and flutter_secure_storage_windows 3.0.0 depends on win32 ^5.0.0, flutter_secure_storage ^9.0.0 requires win32 ^5.0.0.
Because wakelock_windows >=0.2.1 depends on win32 ^3.0.0 and wakelock_windows <0.2.1 depends on win32 ^2.0.0, every version of wakelock_windows requires win32 ^2.0.0 or ^3.0.0.
Thus, flutter_secure_storage ^9.0.0 is incompatible with wakelock_windows.
And because better_player >=0.0.82 depends on wakelock ^0.6.1+2 which depends on wakelock_windows ^0.2.0, flutter_secure_storage ^9.0.0 is incompatible with better_player >=0.0.82.
So, because app_pluscharge depends on both better_player ^0.0.83 and flutter_secure_storage ^9.0.0, version solving failed.

You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on better_player: flutter pub add better_player:^0.0.63
sajedulsakib001 commented 5 months ago

As you said, if I just change the version in betterplayer/pubspec.yaml, will it fix the issue?

fabioselau077 commented 5 months ago

As you said, if I just change the version in betterplayer/pubspec.yaml, will it fix the issue?

try better_player_plus

amalshyjo commented 5 months ago

As you said, if I just change the version in betterplayer/pubspec.yaml, will it fix the issue?

Yes unless there is a syntax change/ breaking change in the newer version just updating the pub version should do it. But the merges haven't been published yet