RunUnaryHandler typedef Null safety

R RunUnaryHandler <R, T>(
  1. Zone self,
  2. ZoneDelegate parent,
  3. Zone zone,
  4. R f(
    1. T arg
  5. T arg

The type of a custom Zone.runUnary implementation function.


The function f and value arg are the function and argument which was passed to the Zone.runUnary of zone.

The default behavior of Zone.runUnary is to call f with argument arg in the current zone, zone. A custom handler can do things before, after or instead of calling f.


typedef RunUnaryHandler = R Function<R, T>(
    Zone self, ZoneDelegate parent, Zone zone, R Function(T arg) f, T arg);