NativeCallable class - dart:ffi library (original) (raw)
A native callable which listens for calls to a native function.
Creates a native function linked to a Dart function, so that calling the native function will call the Dart function in some way, with the arguments converted to Dart values.
Annotations
- @Since('3.1')
Constructors
NativeCallable.isolateLocal(@DartRepresentationOf("T") Function callback, {Object? exceptionalReturn})
Constructs a NativeCallable that must be invoked from the same thread that created it.
factory
NativeCallable.listener(@DartRepresentationOf("T") Function callback)
Constructs a NativeCallable that can be invoked from any thread.
factory
Properties
The hash code for this object.
no setterinherited
Whether this NativeCallable keeps its Isolate alive.
getter/setter pair
nativeFunction → Pointer<NativeFunction<T>>
The native function pointer which can be used to invoke the callback
passed to the constructor.
no setter
A representation of the runtime type of the object.
no setterinherited
Methods
close()→ void
Closes this callback and releases its resources.
noSuchMethod(Invocation invocation)→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
A string representation of this object.
inherited
Operators
operator ==(Object other)→ bool
The equality operator.
inherited