RunHandler typedef Null safety

R RunHandler <R>(
  1. Zone self,
  2. ZoneDelegate parent,
  3. Zone zone,
  4. R f(

    The type of a custom 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 is the function which was passed to the of zone.

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


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