CreatePeriodicTimerHandler typedef Null safety
The type of a custom Zone.createPeriodicTimer implementation function.
Receives the Zone that the handler was registered on as
a delegate forwarding to the handlers of
self's parent zone as
and the current zone where the error was uncaught as
which will have
self as a parent zone.
The callback function
period are the ones which were
passed to Zone.createPeriodicTimer of
(possibly through the Timer.periodic constructor).
The custom handler can choose to replace the function
with one that does something before, after or instead of calling
and then call
or it can implement its own timer queue, which typically
still depends on
parent.createTimer to as a way to get started.
The function should return a Timer object which can be used to inspect and control the scheduled timer callbacks.
The function must only access zone-related functionality through
It should not depend on the current zone (Zone.current).
typedef Timer CreatePeriodicTimerHandler(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f(Timer timer));