10.7 C
New York
Tuesday, December 6, 2022

How to upgrade Flutter SDK and package dependencies

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:Advertisements

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:

Dependencies      Current                Upgradable             Resolvable             Latest                
cupertino_icons   *1.0.0                 *1.0.0                 *1.0.0                 1.0.1                 
path              *1.8.0-nullsafety.1    *1.8.0-nullsafety.1    *1.8.0-nullsafety.1    1.8.0-nullsafety.3    

dev_dependencies: all up-to-date

transitive dependencies
characters        *1.1.0-nullsafety.3    *1.1.0-nullsafety.3    *1.1.0-nullsafety.3    1.1.0-nullsafety.5    
charcode          *1.2.0-nullsafety.1    *1.2.0-nullsafety.1    *1.2.0-nullsafety.1    1.2.0-nullsafety.3    
collection        *1.15.0-nullsafety.3   *1.15.0-nullsafety.3   *1.15.0-nullsafety.3   1.15.0-nullsafety.5   
meta              *1.3.0-nullsafety.3    *1.3.0-nullsafety.3    *1.3.0-nullsafety.3    1.3.0-nullsafety.6    
source_span       *1.8.0-nullsafety.2    *1.8.0-nullsafety.2    *1.8.0-nullsafety.2    1.8.0-nullsafety.4    
string_scanner    *1.1.0-nullsafety.1    *1.1.0-nullsafety.1    *1.1.0-nullsafety.1    1.1.0-nullsafety.3    
term_glyph        *1.2.0-nullsafety.1    *1.2.0-nullsafety.1    *1.2.0-nullsafety.1    1.2.0-nullsafety.3    
typed_data        *1.3.0-nullsafety.3    *1.3.0-nullsafety.3    *1.3.0-nullsafety.3    1.3.0-nullsafety.5    
vector_math       *2.1.0-nullsafety.3    *2.1.0-nullsafety.3    *2.1.0-nullsafety.3    2.1.0-nullsafety.5    
win32             *1.7.3                 1.7.4                  1.7.4                  1.7.4                 

transitive dev_dependencies
async             *2.5.0-nullsafety.1    *2.5.0-nullsafety.1    *2.5.0-nullsafety.1    2.5.0-nullsafety.3    
boolean_selector  *2.1.0-nullsafety.1    *2.1.0-nullsafety.1    *2.1.0-nullsafety.1    2.1.0-nullsafety.3    
clock             *1.1.0-nullsafety.1    *1.1.0-nullsafety.1    *1.1.0-nullsafety.1    1.1.0-nullsafety.3    
fake_async        *1.2.0-nullsafety.1    *1.2.0-nullsafety.1    *1.2.0-nullsafety.1    1.2.0-nullsafety.3    
matcher           *0.12.10-nullsafety.1  *0.12.10-nullsafety.1  *0.12.10-nullsafety.1  0.12.10-nullsafety.3  
stack_trace       *1.10.0-nullsafety.1   *1.10.0-nullsafety.1   *1.10.0-nullsafety.1   1.10.0-nullsafety.6   
stream_channel    *2.1.0-nullsafety.1    *2.1.0-nullsafety.1    *2.1.0-nullsafety.1    2.1.0-nullsafety.3    
test_api          *0.2.19-nullsafety.2   *0.2.19-nullsafety.2   *0.2.19-nullsafety.2   0.2.19-nullsafety.6   

1 upgradable dependency is locked (in pubspec.lock) to an older version.
To update it, use `pub upgrade`.

AdvertisementsThat’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.

Advertisements

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles