ZoneSpecification.from constructor Null safety
- ZoneSpecification other,
- {HandleUncaughtErrorHandler? handleUncaughtError,
- R run(
- Zone self,
- ZoneDelegate parent,
- Zone zone,
- R f(
- R runUnary(
- Zone self,
- ZoneDelegate parent,
- Zone zone,
- R f(
- T arg
- T arg
- R runBinary(
- Zone self,
- ZoneDelegate parent,
- Zone zone,
- R f(
- T1 arg1,
- T2 arg2
- T1 arg1,
- T2 arg2
- ZoneCallback<
R> registerCallback(- Zone self,
- ZoneDelegate parent,
- Zone zone,
- R f(
- ZoneUnaryCallback<
R, T> registerUnaryCallback(- Zone self,
- ZoneDelegate parent,
- Zone zone,
- R f(
- T arg
- ZoneBinaryCallback<
R, T1, T2> registerBinaryCallback(- Zone self,
- ZoneDelegate parent,
- Zone zone,
- R f(
- T1 arg1,
- T2 arg2
- ErrorCallbackHandler? errorCallback,
- ScheduleMicrotaskHandler? scheduleMicrotask,
- CreateTimerHandler? createTimer,
- CreatePeriodicTimerHandler? createPeriodicTimer,
- PrintHandler? print,
- ForkHandler? fork}
Creates a specification from other
and provided handlers.
The created zone specification has the handlers of other
and any individually provided handlers.
If a handler is provided both through other
and individually,
the individually provided handler overries the one from other
.
Implementation
factory 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}) {
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);
}