The type of a custom Zone.fork implementation function.
Receives the Zone that the handler was registered on as
a delegate forwarding to the handlers of
self's parent zone as
and the current zone where the error was uncaught as
which will have
self as a parent zone.
The handler should create a new zone with
zone as its
immediate parent zone.
zoneValues are the ones which were
passed to Zone.fork of
zone. They specify the custom zone
handlers and zone variables that the new zone should have.
The custom handler can change the specification or zone
values before calling
parent.fork(zone, specification, zoneValues),
but it has to call the
parent's ZoneDelegate.fork in order
to create a valid Zone object.
The function must only access zone-related functionality through
It should not depend on the current zone (Zone.current).
typedef ForkHandler = Zone Function(Zone self, ZoneDelegate parent, Zone zone,
ZoneSpecification? specification, Map<Object?, Object?>? zoneValues);