ZoneDelegate class

This class wraps zones for delegation.

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()

Instance Methods

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