After I recently upgraded flutter to 3.0.0 and flutter_lints to 2.0.1, I started getting the following warning:
Depend on referenced packages.
Here, the dependency that is imported is defined in the pubspec.yaml of another module that the current module already depends on. In other words, the dependency flow is as follows:
A (module that gives warning and imports D) -> B -> D
I don't understand why I see this warning. Just because module A doesn't directly depend on library D? What should I do with this warning? How can I eliminate it without ignoring the rule in analysis_options.yaml file?
Had the same warning.
In my case it was caused by flutter_localizations.
I realized I put
flutter_localizations:
sdk: flutter
below dev_dependencies and not below dependencies in pubspec.yaml.
Maybe you have the same or similar problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With