inspect method

T? inspect(
  1. void f(
    1. T
    )
)

Calls the provided closure with a reference to the value if it is not null and returns the value.

Implementation

T? inspect(void Function(T) f) {
  final self = this;
  if (self != null) f(self);
  return self;
}