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

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

hashCodeint

The hash code for this object.

no setterinherited

keepIsolateAlivebool

Whether this NativeCallable keeps its Isolate alive.

getter/setter pair

nativeFunctionPointer<NativeFunction<T>>

The native function pointer which can be used to invoke the callbackpassed to the constructor.

no setter

runtimeTypeType

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

toString()→ String

A string representation of this object.

inherited

Operators

operator ==(Object other)→ bool

The equality operator.

inherited