RegisterUnaryCallbackHandler typedef

ZoneUnaryCallback<R, T> RegisterUnaryCallbackHandler <R, T>(
  1. Zone self,
  2. ZoneDelegate parent,
  3. Zone zone,
  4. R f(
    1. T arg
    )
)

The type of a custom Zone.registerUnary implementation function.

Receives the Zone that the handler was registered on as self, a delegate forwarding to the handlers of self's parent zone as parent, and the current zone where the error was uncaught as zone, which will have self as a parent zone.

The function f is the function which was passed to the which was passed to the Zone.registerUnary of zone.

The handler should return either the function f or another function replacing f, typically by wrapping f in a function which does something extra before and after invoking f

Implementation

typedef RegisterUnaryCallbackHandler = ZoneUnaryCallback<R, T> Function<R, T>(
    Zone self, ZoneDelegate parent, Zone zone, R Function(T arg) f);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-async/RegisterUnaryCallbackHandler.html