loadFunction<FN extends Function> function

Pointer<NativeFunction<FN>> loadFunction<FN extends Function>(
  1. DynamicLibrary lib,
  2. String name
)

Implementation

Pointer<NativeFunction<FN>> loadFunction<FN extends Function>(
    DynamicLibrary lib, String name) {
  Pointer<NativeFunction<FN>>? funcPointer;
  if (lib.providesSymbol(name)) {
    funcPointer = lib.lookup(name);
  } else {
    funcPointer = loadDynamicFunction(name);
  }
  return funcPointer;
}