Dart:修订间差异
跳到导航
跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
(→範例) |
(→範例) |
||
第9行: | 第9行: | ||
== 範例 == | == 範例 == | ||
先 | 先 初始化目錄 : | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
第15行: | 第15行: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
然後進到<code>foo/</code>裡面開始修改,首先是<code>pubspec.yaml</code>: | 然後進到<code>foo/</code>裡面 把[[Git]]先弄起來: | ||
<syntaxhighlight lang="bash"> | |||
cd foo; git init .; git add .; git commit -av -m 'Init' | |||
</syntaxhighlight> | |||
開始修改,首先是<code>pubspec.yaml</code>: | |||
<syntaxhighlight lang="yaml"> | <syntaxhighlight lang="yaml"> |
2024年3月13日 (三) 09:47的版本
Dart是一個程式語言。
安裝
wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg; echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list; sudo apt update; sudo apt install -y dart; sudo apt clean
範例
先初始化目錄:
dart create foo
然後進到foo/
裡面把Git先弄起來:
cd foo; git init .; git add .; git commit -av -m 'Init'
開始修改,首先是pubspec.yaml
:
dependencies:
http: ^1.2.1
然後改bin/foo.dart
:
void main() {
print('Hello, world!');
}
相關連結
外部連結
- 官方网站 (英文)