Reputation: 121
Suppose I have analyzer package that is a transitive dependency set to 2.8.0^ and latest version 3.0.0 is available.So using dart pub upgrade will upgrade it or I have to manually make it ^3.0.0 in pubspec.yaml and then run pub get
Upvotes: 2
Views: 1390
Reputation: 656
It will automatically update the dependencies when you use dart pub upgrade
If there is a dependency say ^2.7.0 with you and there is a newer version (2.8.0) available, it will automatically upgrade to ^2.8.0 unless there is any dependency constraints.
You could use dart pub upgrade --major-versions
so that ^2.8.0 can be upgraded to ^3.0.0.
Anyway you'll be suggested to use this command when using dart pub upgrade
I was upgrading webview_flutter
from ^2.8.0 to 3.0.0:
dart pub upgrade
(checked what new dependencies are there).dart pub outdated
.webview_flutter
was not upgraded.dart pub upgrade --major-versions
..yaml
fileLook here for more about the command.
Upvotes: 4