4

Ive looked all over the official Dart site. They go into great depth about 'dev' channels and 'stable' channels but no clue whatsover about how to actually install a version of the SDK. There is no information about the current stable and dev versions either.

Clearly I have missed something hiding in plain site. I want to try out some official angulardart component libraries but the builder requires Dart version 2 - but I have no idea how to get that.

Can someone put me out of my misery, and tell me how I'm being an idiot

Thanks

Dean Chalk
  • 20,076
  • 6
  • 59
  • 90

4 Answers4

5

Installation instructions for dart v2 (which currently only has a dev channel release) can be found here. To summarize,

Mac Installation with homebrew

brew tap dart-lang/dart
brew install dart --devel

Edit: If you are upgrading from Dart 1 see, How to upgrade to Dart 2?

Windows Installation

Visit here for the graphical installer or if you have Chocolatey installed do:

choco install dart-sdk -version 2

Linux

sudo apt-get update
sudo apt-get install apt-transport-https
sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
sudo apt-get update
export PATH=/usr/lib/dart/bin:$PATH
sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_unstable.list > /etc/apt/sources.list.d/dart_unstable.list'
sudo apt-get install dart
Patrice Chalin
  • 15,440
  • 7
  • 33
  • 44
0

Ahhhhhhh. If you go to https://www.dartlang.org/install/archive

And then wait for about 10 minutes, you suddenly get some links. - Problem solved.

Dean Chalk
  • 20,076
  • 6
  • 59
  • 90
0

The latest version in the dev channel is Dart 2 (2.0.0-alpha.36). There is no released Dart 2 yet. This VM and tools can still process most Dart 1 code. There are several flags to enable Dart 2 features for the VM or tools

--preview-dart-2
--reify-generic-functions
--reify-generics
--limit-ints-to-64-bits
--sync-async

these options are highly experimental and in flux.
Not all tools support the same set of options.
New options might be added or existing ones removed when the behavior becomes the default without previous anouncement.

I found above options in https://github.com/dart-lang/sdk/blob/b0a2e6b9c99d8a13ecd59d1636d5201adc77fc07/tools/testing/dart/test_suite.dart

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
0

for windows go to dart.dev for install dart if you want if dart is install in your pc 1-open terminal and type this command dart --version when will appear version dart ex: 2.28 (sdkDart)