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

Properties

hashCode int

Get a hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

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, zoneValues) Zone

handleUncaughtError(Zone zone, error, StackTrace stackTrace) → dynamic

noSuchMethod(Invocation invocation) → dynamic

noSuchMethod is invoked when users invoke a non-existent method on an object. The name of the method and the arguments of the invocation are passed to noSuchMethod in an Invocation. If noSuchMethod returns a value, that value becomes the result of the original invocation.

inherited
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

toString() String

Returns a string representation of this object.

inherited