xgqfrms / dart

dart for flutter
https://dart.xgqfrms.xyz/
MIT License
1 stars 0 forks source link
dart flutter

Dart

dart for flutter

Dart SDK

dart 2.3.2 dart 2.8.4 dart 2.9.1 / Flutter 1.20

https://dart.dev/get-dart

https://dart.dev/tools/sdk/archive

https://dart.dev/tools/dart-vm

https://github.com/IOT-DSA/docs/wiki/Update-Dart-SDK

DartPad (Dart/Flutter)

REPL & Playground

https://dartpad.dev/

https://dartpad.dartlang.org/

macOS

# install
$ brew tap dart-lang/dart
$ brew install dart

$ brew upgrade dart
$ brew info dart

$ dart --version

Windows

# install
# windows & user env
PUB_HOSTED_URL
https://pub.flutter-io.cn

# windows & system env & DART_SDK
DART_SDK
H:\Program Files\Dart-SDK\dart-sdk

# windows & system env & JDK (Open JDK)
JAVA_HOME
H:\JDK-12

# windows & system env & PATH
H:\Program Files\Dart-SDK\dart-sdk\bin
%JAVA_HOME%\bin

手动安装 Dart SDK

使用工具自动安装 Dart SDK 失败时,还可以手动安装。

  1. 下载并解压,将 dart sdk 中的 bin 文件夹添加到系统环境变量即可。

手动添加 env

# windows & user env
PUB_HOSTED_URL
https://pub.flutter-io.cn

# windows & system env & DART_SDK
DART_SDK
# not work
H:\Program Files\Dart-SDK\dart-sdk
## OK
H:\Program Files\Dart-SDK\dart-sdk\bin

# windows & system env & JDK (Open JDK)
JAVA_HOME
H:\JDK-12

# windows & system env & PATH
H:\Program Files\Dart-SDK\dart-sdk\bin
%JAVA_HOME%\bin

test

$ dart app.dart
# Hello World!

# running a Dart file on the command line
$ dart --enable-asserts app.dart

https://www.dart-china.org/t/topic/480#heading--manual-install


Flutter 1.5

include dart

https://flutter.dev/docs/get-started/install

https://flutter.dev/docs/get-started/install/macos

v1.5.4-hotfix.2

https://flutter.dev/docs/development/tools/sdk/releases?tab=macos

1.9.X

1.17.3 channel stable

https://github.com/flutter/flutter.git

1.17.5 channel stable

https://github.com/flutter/flutter/releases