class Person { var name; var age; Person(this.name, this.age); getInfo() { print("${this.name},${this.age}"); }}main() { var p = new Person('...
//创建自定义类 命名为Personclass Person { var name = "张三"; var age = 30; setInfo() { this.age = 50; } getInfo() { print("${this.name}, ${this.age}");...
void main() { bool flag = true; var val = flag ? 'true' : 'false'; print(val); //val为true i