CallbackHandler<CallbackInputType, CallbackReturnType> constructor

CallbackHandler<CallbackInputType, CallbackReturnType>({
  1. void onError(
    1. Object error,
    2. StackTrace stackTrace
    )?,
})

Creates a new CallbackHandler instance.

Initializes an empty callback storage with O(1) operations. Supply onError to observe the errors thrown by callbacks during call.

Implementation

CallbackHandler({this.onError})
    : map = FastMap<int,
          CallbackWithReturn<CallbackInputType, CallbackReturnType>>();