DartPad
https://dart.dev/
https://dart.dev/tools/dartpad
DartPad中文的地址:
https://dartpad.cn
dartpad.cn默认的展示。
void main() {
for (int i = 0; i < 5; i++) {
print(‘hello ${i + 1}‘);
}
}
必须要写在入口main中才可以正确的输出
main(){
print("Hello World!");
}
main(){
String name = ‘dart‘;
var otherName=‘Dart‘;
print(name + otherName);
}
main(){
var myNull=null;
if(myNull == null){
print(‘use "== null" to check null‘);
}
var zero = 0;
if(zero == 0){
print(‘use "== 0" to check zero‘);
}
}
结束
原文地址:https://www.cnblogs.com/wangjunwei/p/12182555.html
时间: 2024-10-31 10:07:46