This class wraps zones for delegation.

When forwarding to parent zones one can't just invoke the parent zone's exposed functions (like Zone.run), but one needs to provide more information (like the zone the run was initiated). Zone callbacks thus receive more information including this ZoneDelegate class. When delegating to the parent zone one should go through the given instance instead of directly invoking the parent zone.

Constructors

ZoneDelegate()

Methods

createPeriodicTimer(Zone zone, Duration period, void f(Timer timer)) → Timer
createTimer(Zone zone, Duration duration, void f()) → Timer
errorCallback(Zone zone, Object error, StackTrace stackTrace) → AsyncError
fork(Zone zone, ZoneSpecification specification, Map zoneValues) → Zone
handleUncaughtError(Zone zone, error, StackTrace stackTrace) → dynamic
print(Zone zone, String line) → void
registerBinaryCallback(Zone zone, dynamic f(arg1, arg2)) → ZoneBinaryCallback
registerCallback(Zone zone, dynamic f()) → ZoneCallback
registerUnaryCallback(Zone zone, dynamic f(arg)) → ZoneUnaryCallback
run(Zone zone, dynamic f()) → dynamic
runBinary(Zone zone, dynamic f(arg1, arg2), arg1, arg2) → dynamic
runUnary(Zone zone, dynamic f(arg), arg) → dynamic
scheduleMicrotask(Zone zone, dynamic f()) → void