A. Windows environment
1. Choco install Dart SDK
Recommended direct use choco
installed, on choco
how to use can refer https://chocolatey.org/
Official documents address: https: //dart.dev/get-dart#install-using-chocolatey
Install stable version:
choco install dart-sdk
Install development version:
choco install dart-sdk --pre
Upgrade dart version:
choco upgrade dart-sdk
2. Decompression Installation Configuration
To dart Chinese network to download, depending on the type of development specified SDK download
unpacked directory structure
configuration environment variable
DARK_HOME=D:\dartsdk-windows-x64-release\dart-sdk
path变量中添加%DARK_HOME%\bin;
3. Install version
To Dart SDK installer for Windows official address to download Dark, select the corresponding type of system
installed directly to the specified path
4. Test whether the installation is successful
dart --version
dart
Two. Mac environment
brew install dart
Under OSX install dart through the brew is very convenient, if not installed brew, you can go http://brew.sh/
The official address of the document:
- https://dart.dev/get-dart
Install stable version:
brew tap dart-lang/dart
brew install dart
Install development version:
brew install dart --devel
updated version:
brew upgrade dart
Switch Version:
brew switch dart 1.24.3
brew switch dart 2.1.0
三 . IntelliJ IDEA
1. IntelliJ IDEA download and install
Dart has many common IDE plug-ins can be used. If you have not used the IDE, we're using IntelliJ IDEA , Dart install plug-ins to support development.
2. Install the plug-Dart
Settings -> Plugins -> Marketplace -> 搜索 Dart -> Install -> 重启IDE
3. Create a project Dart
File -> New Project -> Select the Dart Project -> Configure Dart sdk path of
the new general project directory structure
to create a new Dart file in the project file Demo.dart
// 定义个方法。
printNumber(num aNumber) {
print('The number is $aNumber.'); // 在控制台打印内容。
}
// 这是程序执行的入口。
main() {
var number = 42; // 定义并初始化一个变量。
printNumber(number); // 调用一个方法。
}
Run the test
Welcome to sweep the two-dimensional surface following code concern " cosine plots " public micro signal