How To Upgrade Flutter SDK & Dependencies via Terminal?

How To Upgrade Flutter SDK & Dependencies via Terminal

Lately, I had only been working on Laravel projects and other web apps and did not get much time to delve into Flutter code. That also meant, the Flutter SDK was not updated in a while and neither were the associated flutter packages.

It turns out, updating Flutter SDK and Flutter Packages was a very simple affair. Here’s how you do it:

Step 1: Update the Flutter SDK

Open your terminal, use type the following command:

flutter upgrade

In case the above command doesn’t work for you, try the same command but with the –force flag this time. The command would now look like this:

flutter upgrade --force
Upgrading the Flutter SDK
Upgrading the Flutter SDK

In case your SDK is already up to date, you will see a relevant message in the terminal, like what is shown below:

Flutter SDK is already updated
Flutter SDK is already updated

Step 2: Update Flutter Packages and dependencies

Next in line is upgrading the Flutter dependencies. In order to do that, go to your project’s root directory and run the following command:

flutter pub upgrade

This should upgrade all your project dependencies.

Updating Project Dependencies
Updating Project Dependencies

That’s all about upgrading the Flutter SDK & Flutter packages.

Share This Post

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe To my Future Posts

Get notified whenever I post something new

More To Explore