Dart_DeferredLoadHandler typedef
Handles deferred loading requests. When this handler is invoked, it should eventually load the deferred loading unit with the given id and call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is recommended that the loading occur asynchronously, but it is permitted to call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the handler returns.
If an error is returned, it will be propagated through
prefix.loadLibrary()
. This is useful for synchronous
implementations, which must propagate any unwind errors from
Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler
should return a non-error such as Dart_Null()
.
Implementation
typedef Dart_DeferredLoadHandler
= ffi.Pointer<ffi.NativeFunction<Dart_DeferredLoadHandlerFunction>>;