NativeFunction class

Wraps a native Dart function, making it callable from the interpreted language.

Allows defining built-in functions (like print, range, len, etc.) implemented in Dart.

Constructors

NativeFunction(Function _function)
Creates a callable wrapper around a native Dart function _function.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(Interpreter interpreter, List<Object?> positionalArgs, Map<String, Object?> keywordArgs) → Object?
Executes the wrapped native Dart function.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
Returns a generic string representation (e.g., <native fn>).
override

Operators

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