also method

T also(
  1. void f(
    1. T
    )
)

Calls the specified function f with as its argument and returns this.

Example:

var user = User().also((u) => u.name = 'John');

Implementation

T also(void Function(T) f) {
  f(this);
  return this;
}