FfiNative<T> class Null safety

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

Example:

@FfiNative<Int64 Function(Int64, Int64)>('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 is an experimental feature and may change in the future.

Constructors

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

Properties

hashCode int
The hash code for this object.
read-only, inherited
isLeaf bool
final
nativeName String
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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