also method
T
also(
- void block(
- T it
Executes block with this for side effects, then returns this.
Useful for logging or debugging in a fluent chain:
fetchData().also((d) => print('Got: $d')).process();
Implementation
T also(void Function(T it) block) {
block(this);
return this;
}