ZoneSpecification abstract class

This class provides the specification for a forked zone.

When forking a new zone (see Zone.fork) one can override the default behavior of the zone by providing callbacks. These callbacks must be given in an instance of this class.

Handlers have the same signature as the same-named methods on Zone but receive three additional arguments:

  1. the zone the handlers are attached to (the "self" zone).
  2. a ZoneDelegate to the parent zone.
  3. the zone that first received the request (before the request was bubbled up).

Handlers can either stop propagation the request (by simply not calling the parent handler), or forward to the parent zone, potentially modifying the arguments on the way.

Constructors

ZoneSpecification({HandleUncaughtErrorHandler handleUncaughtError, RunHandler run, RunUnaryHandler runUnary, RunBinaryHandler runBinary, RegisterCallbackHandler registerCallback, RegisterUnaryCallbackHandler registerUnaryCallback, RegisterBinaryCallbackHandler registerBinaryCallback, ErrorCallbackHandler errorCallback, ScheduleMicrotaskHandler scheduleMicrotask, CreateTimerHandler createTimer, CreatePeriodicTimerHandler createPeriodicTimer, PrintHandler print, ForkHandler fork })
const
factory

Creates a specification with the provided handlers.

ZoneSpecification.from(ZoneSpecification other, { HandleUncaughtErrorHandler handleUncaughtError: null, RunHandler run: null, RunUnaryHandler runUnary: null, RunBinaryHandler runBinary: null, RegisterCallbackHandler registerCallback: null, RegisterUnaryCallbackHandler registerUnaryCallback: null, RegisterBinaryCallbackHandler registerBinaryCallback: null, ErrorCallbackHandler errorCallback: null, ScheduleMicrotaskHandler scheduleMicrotask: null, CreateTimerHandler createTimer: null, CreatePeriodicTimerHandler createPeriodicTimer: null, PrintHandler print: null, ForkHandler fork: null })
factory

Creates a specification from other with the provided handlers overriding the ones in other.

Properties

createPeriodicTimerCreatePeriodicTimerHandler
read-only
createTimerCreateTimerHandler
read-only
errorCallbackErrorCallbackHandler
read-only
forkForkHandler
read-only
handleUncaughtErrorHandleUncaughtErrorHandler
read-only
printPrintHandler
read-only
registerBinaryCallbackRegisterBinaryCallbackHandler
read-only
registerCallbackRegisterCallbackHandler
read-only
registerUnaryCallbackRegisterUnaryCallbackHandler
read-only
runRunHandler
read-only
runBinaryRunBinaryHandler
read-only
runUnaryRunUnaryHandler
read-only
scheduleMicrotaskScheduleMicrotaskHandler
read-only
hashCodeint
read-only, inherited

The hash code for this object.

runtimeTypeType
read-only, inherited

A representation of the runtime type of the object.

Operators

operator ==(other) → bool
inherited

The equality operator.

Methods

noSuchMethod(Invocation invocation) → dynamic
inherited

Invoked when a non-existent method or property is accessed.

toString() → String
inherited

Returns a string representation of this object.

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-async/ZoneSpecification-class.html