Obtaining the Dart SDK
platform | Describe the application | Access to the SDK |
---|---|---|
The mobile terminal | Developing apps that run on both iOS and Android requires only one code base | Flutter |
Web | The development can run on any new browser application | Dart webdev |
The server | Develop command line applications or server applications | Server-side Dart Chinese SDK |
Mac installation Dart
The installationHomebrewThen execute the code
$brew tap dart-lang/dart $brew install dart stable $brew install dart --develTo install the dev distribution, use --devel
Copy the code
To Upgrade the Upgrade
To upgrade when a new version of Dart becomes available, run:
$ brew upgrade dart
To install a stable channel version while the development version is currently active, run:
$ brew unlink dart
$ brew install dart
To upgrade to the dev channel version while the stable version is currently active, run:
$ brew upgrade dart --devel --force
Copy the code
Version Switch Switch Release
To switch between locally installed dart versions, run Brew Switch Dart. Example:
Brew Switch Dart 1.24.3 $BREW Switch Dart 2.0.0Copy the code
View dart information
View the DART information to install
$ brew info dart
# View the version of DART
$ dart --version
Check the dart installation path
$ which dart
Copy the code
MAC Manual installation method
-
Download the decompression package
- Click to download the attachment sdkdartsDK-MacOS-x64-release.zip directly
- Or download darT-SDK from the Dart Chinese community network
-
Configuring environment Variables
Linux installation Dart
$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 sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
$ sudo apt-get update
$ sudo apt-getIf the dev version is required, replace step 4 above with the following command: $sudo sh -c'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_unstable.list > /etc/apt/sources.list.d/dart_unstable.list'Set the environment variable $export PATH=/usr/lib/dart/bin:$PATH
Copy the code
Windows installation Dart
Step 1: Configure environment variables
Personal hobbies, like to put in D disk do not like to put in C disk (why their own baidu). Download the package and unzip it into D:\Program Files.
Step 2: Open CMD to see if the installation is successful.
The document is recommended
- Dart Assembly Language Chinese