Flutter uses the dart-lang
SDK (and executable). So when I want to see what version I'm using, I run this and get the following:
flutter --version
Output
Flutter 1.23.0-18.1.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 198df796aa (7 days ago) • 2020-10-15 12:04:33 -0700
Engine • revision 1d12d82d9c
Tools • Dart 2.11.0 (build 2.11.0-213.1.beta)
Version: 2.11.0
But when I check my machine's dart
version. I see something different..
dart --version
Output
Dart SDK version: 2.10.2 (stable) (Tue Oct 13 15:50:27 2020 +0200) on "macos_x64"
Version: 2.10.2
How can I make sure I'm always using the same dart-sdk
and executable between the dart
tool and flutter
? What is managing the two tools? Should I worry about Flutter and Dart version being different (edit)?
Flutter version and dart version don't have to be the same. You can see from here, the latest Dart SDK version is 2.10.0. But there are lots of newer versions in Flutter as in here. Dart has a version note in their documentation:
As of Flutter 1.21, the Flutter SDK includes the full Dart SDK. This site’s documentation and examples use version 2.10.0 of the Dart SDK.