How to upgrade Flutter SDK and package dependencies

Updated: February 27, 2023 By: A Goodman Post a comment

To upgrade Flutter SDK, run the following command:

flutter upgrade

If the preceding command didn’t work for you, just add the –force flag, like this:

flutter upgrade --force

To update all the dependencies listed in a Flutter project’s pubspec.yaml file to the latest compatible versions, execute this command:

flutter pub upgrade

To check outdated plugins, run:

flutter pub outdated

Then you’ll see something similar to this:

Showing outdated packages.
[*] indicates versions that are not the latest available.

Package Name  Current   Upgradable  Resolvable  Latest   

direct dependencies:
path          *1.8.2    *1.8.2      *1.8.2      1.8.3    

dev_dependencies: all up-to-date.

transitive dependencies:
characters    *1.2.1    *1.2.1      *1.2.1      1.3.0    
collection    *1.17.0   *1.17.0     *1.17.0     1.17.1   
js            *0.6.5    *0.6.5      *0.6.5      0.6.7    
meta          *1.8.0    *1.8.0      *1.8.0      1.9.0    
win32         *3.1.3    *3.1.3      *3.1.3      4.1.1    

transitive dev_dependencies:
matcher       *0.12.13  *0.12.13    *0.12.13    0.12.14  
test_api      *0.4.16   *0.4.16     *0.4.16     0.4.18   
You are already using the newest resolvable versions listed in the 'Resolvable' column.
Newer versions, listed in 'Latest', may not be mutually compatible.

That’s it. Happy Fluttering.

Further reading:

You can also check out our Flutter category page or Dart category page for the latest tutorials and examples.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Related Articles