xxxxxxxxxx
// To upgrade Dart SDK, you can use the following command in the terminal:
$ dart pub global activate dart_sdk_version_manager
// Then, you can run the upgrade command:
$ dart-sdk-version upgrade
xxxxxxxxxx
//changing to any channel you want before upgrade
//for dev channel
$ flutter channel dev
//for beta channel
$ flutter channel beta
//for stable channel
$ flutter channel stable
//then run this
$ flutter upgrade
// but incase the upgrade does not work, use this
// but make sure you push all your code to what ever online repo
// you are using
flutter upgrade --force