also method
T
also(
- void op(
- T it
Calls the specified function op
with this
value as its argument and returns this
value.
Example:
var person = Person('John').also((it) => it.name = 'Doe');
print(person.name); // Output: Doe
Implementation
T also(void Function(T it) op) {
op(this);
return this;
}