June 2017
Intermediate to advanced
873 pages
18h 9m
English
Now that we've introduced well-designed classes, we need to discuss methods.
The class constructors, methods, mutators (setters), and operators remove some restrictions on the values that must be passed into their parameters .What will happen if an invalid parameter value is passed to a method? One possibility is that the method will fail with a confusing exception or worse it will succeed but with a wrong result. In any case, it's dangerous not check the parameters of a method before using them. The rule here is to check whether the parameter value is valid as soon as possible. The best place to do that is at the beginning of the method.
The Dart VM can work in a developer-friendly ...
Read now
Unlock full access