I'm working on a Flutter app and I want to install the wakelock_plus
plugin: https://pub.dev/packages/wakelock_plus
Here's the output when I run flutter pub add wakelock_plus
:
The current Dart SDK version is 2.19.4.
Because flutter_html >=2.0.0-nullsafety.1 <3.0.0-alpha.1 depends on flutter_svg >=0.22.0 <1.0.0 which depends on xml ^5.0.0, flutter_html >=2.0.0-nullsafety.1 <3.0.0-alpha.1 requires xml ^5.0.0.
And because dbus >=0.7.4 depends on xml ^6.1.0, flutter_html >=2.0.0-nullsafety.1 <3.0.0-alpha.1 is incompatible with dbus >=0.7.4.
And because wakelock_plus <1.2.0 depends on dbus ^0.7.8 and wakelock_plus >=1.2.0 requires SDK version >=3.3.0 <4.0.0, flutter_html >=2.0.0-nullsafety.1 <3.0.0-alpha.1 is incompatible with wakelock_plus.
So, because APP_NAME depends on both flutter_html ^2.2.1 and wakelock_plus any, version solving failed.
pub finished with exit code 65
I've been trying to decipher this for a few hours and I can't figure out if there's a way around the dependency conflict.
Anyone have a suggestion?
FOUND A SOLUTION
I determined that the issue was caused by the underlying flutter_svg
package required by flutter_html
.
Adding the following to my pubspec.yaml
eliminated the dependecy.
dependency_overrides:
flutter_svg: ^1.0.0
Found the solution here: https://github.com/Sub6Resources/flutter_html/issues/978