Slide 17
Slide 17 text
Constructors
class Person {
final name, age;
Person(this.name, this.age);
Person.me() : name = 'Ladislav Thon', age = 30;
static Person cache;
factory Person.cachedMe() {
if (cache == null) { cache = new Person.me(); }
return cache;
}
}