Let's say I'm having two packages in my pubspec.yaml
file.
abc: any
xyz: any
Now, I only want to update abc
package, how do I do that, is there any command like
flutter update abc
To upgrade abc
package and leaving others as it is, run:
dart pub upgrade abc
To upgrade all the packages, run:
dart pub upgrade
First, comment that the packaging line in the pubspec.yaml
file and run flutter pub get
after successfully get packages to uncomment that line (if you want to upgrade/downgrade to a specific version that mentioned version too) it will upgrade to the latest version.
In your case:
step 1:
// abc: any
xyz: any
flutter pub get
step 2:
abd: any
xyz: any
So now abc
will upgrade to the latest version
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