RunBinaryHandler typedef Null safety

R RunBinaryHandler <R, T1, T2>(
  1. Zone self,
  2. ZoneDelegate parent,
  3. Zone zone,
  4. R f(
    1. T1 arg1,
    2. T2 arg2
  5. T1 arg1,
  6. T2 arg2

The type of a custom Zone.runBinary implementation function.

Receives the Zone that the handler was registered on as self, a delegate forwarding to the handlers of self's parent zone as parent, and the current zone where the error was uncaught as zone, which will have self as a parent zone.

The function f and values arg1 and arg2 are the function and arguments which was passed to the Zone.runBinary of zone.

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


typedef RunBinaryHandler = R Function<R, T1, T2>(Zone self, ZoneDelegate parent,
    Zone zone, R Function(T1 arg1, T2 arg2) f, T1 arg1, T2 arg2);