description

# ZoneSpecification class final

A parameter object with custom zone function handlers for Zone.fork.

A zone specification is a parameter object passed to Zone.fork and any underlying ForkHandler custom implementations. The individual handlers, if set to a non-null value, will be the implementation of the corresponding Zone methods for a forked zone created using this zone specification.

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). This is the zone created by Zone.fork where the handler is passed as part of the zone delegation.
2. A ZoneDelegate to the parent zone.
3. The "current" zone at the time the request was made. The self zone is always a parent zone of the current zone.

Handlers can either stop propagating 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})
  Creates a specification with the provided handlers.
  const
ZoneSpecification.from(ZoneSpecification other, {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})
  Creates a specification from `other` and provided handlers.

## Properties

createPeriodicTimer → CreatePeriodicTimerHandler?
  A custom Zone.createPeriodicTimer implementation for a new zone.
  final
createTimer → CreateTimerHandler?
  A custom Zone.createTimer implementation for a new zone.
  final
errorCallback → ErrorCallbackHandler?
  A custom Zone.errorCallback implementation for a new zone.
  final
fork → ForkHandler?
  A custom Zone.handleUncaughtError implementation for a new zone.
  final
handleUncaughtError → HandleUncaughtErrorHandler?
  A custom Zone.handleUncaughtError implementation for a new zone.
  final
hashCode → int
  The hash code for this object.
  no setter inherited
print → PrintHandler?
  A custom Zone.print implementation for a new zone.
  final
registerBinaryCallback → RegisterBinaryCallbackHandler?
  A custom Zone.registerBinaryCallback implementation for a new zone.
  final
registerCallback → RegisterCallbackHandler?
  A custom Zone.registerCallback implementation for a new zone.
  final
registerUnaryCallback → RegisterUnaryCallbackHandler?
  A custom Zone.registerUnaryCallback implementation for a new zone.
  final
run → RunHandler?
  A custom Zone.run implementation for a new zone.
  final
runBinary → RunBinaryHandler?
  A custom Zone.runBinary implementation for a new zone.
  final
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited
runUnary → RunUnaryHandler?
  A custom Zone.runUnary implementation for a new zone.
  final
scheduleMicrotask → ScheduleMicrotaskHandler?
  A custom Zone.scheduleMicrotask implementation for a new zone.
  final

## Methods

noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
toString() → String
  A string representation of this object.
  inherited

## Operators

operator ==(Object other) → bool
  The equality operator.
  inherited