19. class Animal {
int numberOfLegs;
int numberOfHeads;
Animal(int numberOfLegs, int numberOfHeads) {
this.numberOfLegs = numberOfLegs;
this.numberOfHeads = numberOfHeads;
}
}
Syntactic sugar
20. class Animal {
int numberOfLegs;
int numberOfHeads;
Animal(this.numberOfLegs, this.numberOfHeads);
}
Syntactic sugar
21. class Animal {
int numberOfLegs;
int numberOfHeads;
Animal(this.numberOfLegs, this.numberOfHeads);
}
main() {
Animal dragon = new Animal(4, 1);
}
Syntactic sugar
22. class Animal {
int numberOfLegs;
int numberOfHeads;
String _name;
Animal(this.numberOfLegs, this.numberOfHeads);
Animal.withName(this._name);
String get name => "$_name is the best";
set name(String name) => _name = name;
}
Getter and Setter
34. Libraries on Pub
polymer, angular, route,
route_hierarchical,
googleapis, chrome,
json_object, vector_math,
appengine, ...
and more on pub.dartlang.org!
36. Polymer makes it easier
and faster to create anything
from a button to a complete
application across desktop,
mobile, and beyond.
www.polymer-project.org