ZoneSpecification.from(ZoneSpecification other, {HandleUncaughtErrorHandler handleUncaughtError(Zone self, ZoneDelegate parent, Zone zone, error, StackTrace stackTrace): null, RunHandler run(Zone self, ZoneDelegate parent, Zone zone, R f()): null, RunUnaryHandler runUnary(Zone self, ZoneDelegate parent, Zone zone, R f(T arg), T arg): null, RunBinaryHandler runBinary(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2), T1 arg1, T2 arg2): null, RegisterCallbackHandler registerCallback(Zone self, ZoneDelegate parent, Zone zone, R f()): null, RegisterUnaryCallbackHandler registerUnaryCallback(Zone self, ZoneDelegate parent, Zone zone, R f(T arg)): null, RegisterBinaryCallbackHandler registerBinaryCallback(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2)): null, ErrorCallbackHandler errorCallback(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace stackTrace): null, ScheduleMicrotaskHandler scheduleMicrotask(Zone self, ZoneDelegate parent, Zone zone, void f()): null, CreateTimerHandler createTimer(Zone self, ZoneDelegate parent, Zone zone, Duration duration, void f()): null, CreatePeriodicTimerHandler createPeriodicTimer(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f(Timer timer)): null, PrintHandler print(Zone self, ZoneDelegate parent, Zone zone, String line): null, ForkHandler fork(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification specification, Map zoneValues): null})

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

Source

factory 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
}) {
  return new ZoneSpecification(
    handleUncaughtError: handleUncaughtError ?? other.handleUncaughtError,
    run: run ?? other.run,
    runUnary: runUnary ?? other.runUnary,
    runBinary: runBinary ?? other.runBinary,
    registerCallback: registerCallback ?? other.registerCallback,
    registerUnaryCallback: registerUnaryCallback ??
                           other.registerUnaryCallback,
    registerBinaryCallback: registerBinaryCallback ??
                            other.registerBinaryCallback,
    errorCallback: errorCallback ?? other.errorCallback,
    scheduleMicrotask: scheduleMicrotask ?? other.scheduleMicrotask,
    createTimer : createTimer ?? other.createTimer,
    createPeriodicTimer: createPeriodicTimer ?? other.createPeriodicTimer,
    print : print ?? other.print,
    fork: fork ?? other.fork);
}