FfiNative<T> class

Annotation to be used for marking an external function as FFI native.

Example:

@Native<Int64 Function(Int64, Int64)>(symbol: 'FfiNative_Sum', isLeaf:true)
external int sum(int a, int b);

Calling such functions will throw an exception if no resolver was set on the library or the resolver failed to resolve the name.

See Dart_SetFfiNativeResolver in dart_api.h

NOTE: This experimental feature is replaced by Native.

Annotations
  • @Since('2.14')
  • @Deprecated('Use Native instead.')

Constructors

FfiNative(String nativeName, {bool isLeaf = false})
const

Properties

hashCode int
The hash code for this object.
read-onlyinherited
isLeaf bool
Specifies whether the function is a leaf function.
final
nativeName String
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

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