Pattern: Missing use of cascade invocation
Issue: -
DO Use the cascading style when successively invoking methods on the same reference.
Example of incorrect code:
SomeClass someReference = SomeClass();
someReference.firstMethod();
someReference.secondMethod();
Example of incorrect code:
SomeClass someReference = SomeClass();
...
someReference.firstMethod();
someReference.aProperty = value;
someReference.secondMethod();
Example of correct code:
SomeClass someReference = SomeClass()
..firstMethod()
..aProperty = value
..secondMethod();
Example of correct code:
SomeClass someReference = SomeClass();
...
someReference
..firstMethod()
..aProperty = value
..secondMethod();