September 2019
Beginner
512 pages
12h 52m
English
Unlike Java and many other languages, Dart does not have overloading by redefinition, so, to define alternative constructors for a class, you need to use the named constructors:
// ... class fields definition// other constructorsPerson.anonymous() {}
A named constructor is how you define alternative constructors for a class. In the preceding example, we defined an alternative constructor for a Person class without a name.
Read now
Unlock full access