Dart编程实例 - dart字符串插值
void main() {
int n=1+1;
String str1 = "The sum of 1 and 1 is ${n}";
print(str1);
String str2 = "The sum of 2 and 2 is ${2+2}";
print(str2);
}
部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!
void main() {
int n=1+1;
String str1 = "The sum of 1 and 1 is ${n}";
print(str1);
String str2 = "The sum of 2 and 2 is ${2+2}";
print(str2);
}
## Dart编程实例 - Enabling Checked Mode```dartvoid main() { int n=hello; print(n); } ```
## Dart编程实例 - Dart 面向对象编程```dartclass TestClass { void disp() { print(Hello World); }} void main() { TestClass c = new TestClass(); c.d