const声明变量 1.const在=号左边 声明变量,必须在声明时候赋值,一旦赋值就不允许修改。 2. const在=号右边 作用修饰值,意味着对象的深度和值在定义是就完全确定 如 final a = const [1,2
## Dart编程实例 - HelloWorld```dartvoid main() { print(hello world);}```
## Dart编程实例 - 第一个Dart程序```dartmain() { print(Hello World!);}```
## 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
## Dart编程实例 - Dynamic 关键字```dartvoid main() { dynamic x = tom; print(x); }```
## Dart编程实例 - Final 关键字```dartvoid main() { final val1 = 12; print(val1);}```
## Dart编程实例 - Const 关键字```dartvoid main() { final v1 = 12; const v2 = 13; v2 = 12;}```
## Dart编程实例 算术操作符```dartvoid main() { var num1 = 101; var num2 = 2; var res = 0; res = num1+num2; print(Addition: ${res}); res = num1-num2; print(Sub