Skip to content
Have a clear structure

Dart 初体验 ​

获取 Dart SDK ​

在 vs code 中安装插件 ​

  • Dart dart
  • code Runner code runner

创建 Dart 文件 ​

Dart 文件的扩展名为.dart

  • hello.dart

所有的代码都要写在main函数中

dart
void main() {
  print('Hello Dart!');
}
  • 右键后选择 run code运行文件 Alt text

  • 在控制台得到结果 Alt text