September 2019
Beginner
512 pages
12h 52m
English
We've seen that Dart provides the dot notation to access a class member. In addition to that, we can also use the double dot/cascade notation, syntactic sugar, which allows us to chain a sequence of operations on the same object:
main() { Person somePerson = new Person() ..firstName = "Clark" ..lastName = "Kent"; print(somePerson.getFullName()); // prints Clark Kent}
The result is the same as when employing the typical approach. It's just a good way to write succinct and legible code.
Next, we are going to delve deeper into each of the class ...
Read now
Unlock full access