description

# NativeCallable<T extends Function> class abstract final

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.new('3.1')

## Constructors

NativeCallable.isolateGroupBound(@DartRepresentationOf("T") Function callback, {Object? exceptionalReturn})
  Constructs a NativeCallable that can be invoked from any thread.
  factory
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

hashCode → int
  The hash code for this object.
  no setterinherited
keepIsolateAlive ↔ bool
  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
runtimeType → Type
  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