Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

update dart sdk for flutter

Tags:

sdk

flutter

dart

I would like to use dart SDK >= 2.2.0 with flutter. But my current version used BY Flutter is 2.1.2

flutter --version Flutter 1.2.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision 8661d8aecd (2 months ago) • 2019-02-14 19:19:53 -0800 Engine • revision 3757390fa4 Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb) 

I tried to install the 2.2.0 version independently and I succeed :

dart --version Dart VM version: 2.2.0 (Tue Feb 26 15:04:32 2019 +0100) on "macos_x64" 

However, Flutter doesn't use this version as you can see above. I tried to replace files of the dart-sdk used by flutter (flutter/bin/cache/dart-sdk) by the version that I installed independently, but when I try to run Flutter after that I have a snapshot problem so I have put back the original dart-sdk folder in the flutter directory.

Do you have any ideas how can I update it?

PS: I downloaded flutter very recently (10 days ago) from here: https://flutter.dev/docs/get-started/install/macos

like image 898
Itoun Avatar asked Apr 29 '19 06:04

Itoun


People also ask

Can I update dart without updating flutter?

The latest version of dart may be required while using some flutter packages.

What version of dart sdk do I have in flutter?

Checking Flutter SDK Version and Channel You'll see something like below in your terminal window: Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.10. 3, on macOS 12.1 21C52 darwin-x64, locale en) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.


1 Answers

It might be due to the fact you are on channel stable which is the most secure builds of the four channels to get updated (channels are listed here)

If you are a bit more curious to try out the new features without having to risk bad builds I advocate channel beta:

Every month, we pick the "best" dev build of the previous month or so, and promote it to beta. These builds have been tested with our codelabs.

where the stable channel has this description:

When we believe we have a particularly good build, we promote it to the stable channel. We intend to do this more or less every quarter, but this may vary. We recommend that you use this channel for all production app releases. We may ship hotfixes to the stable channel for high-priority bugs, although our intent is to do this rarely.

You can change the channel to point at beta by running this command in your terminal: flutter channel beta followed by flutter upgrade to ensure you have got the last release for this particular branch.

Let me know how this affect your situation.

like image 82
flarkmarup Avatar answered Sep 20 '22 19:09

flarkmarup