DynamicLibrary class

Represents a dynamically loaded C library.

Available extensions

Properties

allocator Allocator
Default allocator for this library
no setter
hashCode int
The hash code for this object.
no setterinherited
memory → Memory
Allocator for this library @deprecated Use allocator
no setter
module → Module
Access the module object
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Closes this dynamic library.
lookup<T extends NativeType>(String name) Pointer<T>
Looks up a symbol in the DynamicLibrary and returns its address in memory.
lookupFunction<T extends Function, F extends Function>(String name) → F
Helper that combines lookup and cast to a Dart function.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openAsync(String path) Future<DynamicLibrary>

Available on DynamicLibrary, provided by the AsyncDynamicLibrary extension

Asynchronously opens a dynamic library from the specified path. The ffi:DynamicLibrary.open is synchronous, but wasm_ffi:DynamicLibrary.open is asynchronous. This helper method uses both asynchronously.
providesSymbol(String symbolName) bool
Checks whether this dynamic library provides a symbol with the given name.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

executable() DynamicLibrary
Emtpy stub for DynamicLibrary.executable
open(String modulePath, {String? moduleName, ModuleLoader? moduleLoader, WasmType? wasmType, GlobalMemory? useAsGlobal}) Future<DynamicLibrary>
Creates a instance based on the given module.
process() DynamicLibrary
Emtpy stub for DynamicLibrary.process