daohoangson / flutter_widget_from_html

Flutter package to render html as widgets that supports hyperlink, image, audio, video, iframe and many other tags.
https://pub.dev/packages/flutter_widget_from_html
MIT License
585 stars 205 forks source link

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. The following dependencies do not satisfy the required version: project ':wakelock' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50 #1214

Closed sed1ka closed 2 weeks ago

sed1ka commented 2 months ago

Description

I have an error message same as on issue #926 . I wondering about dependencies_override, because based on dart: depedencies, they warn about using dependencies_override

Warning: Using a dependency override involves some risk. For example, using an override to specify a version outside the range that the package claims to support, or using an override to specify a local copy of a package that has unexpected behaviors, may break your application.

So I think it will be better to upgrade the chewie on this plugin instead use dependencies_override and I think forcing the user to update the latest version is not a bad thing, than the risk that might occur when using dependencies_override. After all, one day we will have to use the latest version of the library (which has a lot of fixes and enhancements).

daohoangson commented 2 months ago

This package supports all chewie version from 1.0.0 to the latest (1.7.5 as of today) so it's up to your app to select a suitable version. If pub doesn't automatically select the latest one then you probably have some other conflict.

To troubleshoot this, let's try adding dependencies (not override, it's bad practice) and see what the conflict is.

MagTuxGit commented 2 months ago

In my case it was: chewie >=1.7.0 - wakelock_plus ^1.1.0 - package_info_plus >=4.0.2 <6.0.0 I have package_info_plus: ^6.0.0 dependency. I fixed this by overriding package_info_plus: ^6.0.0

sed1ka commented 1 month ago

In my case it was: chewie >=1.7.0 - wakelock_plus ^1.1.0 - package_info_plus >=4.0.2 <6.0.0 I have package_info_plus: ^6.0.0 dependency. I fixed this by overriding package_info_plus: ^6.0.0

You need to check dart: depedencies, they warn about using dependencies_override

MagTuxGit commented 1 month ago

You need to check dart: depedencies, they warn about using dependencies_override

Warning about using dependencies_override doesn't mean you can't use it. I'm sure that overriding package_info_plus won't break my app. If you aren't sure you can check package's changelog for breaking changes.

daohoangson commented 1 month ago

Yes, it's OK to override some dependency if that's required to make them work together. I try to keep the dependencies of this package up to date but the larger Flutter community has many outdated packages. It's inevitable in day to day app development.