DartBlockNativeFunction class

Built-in function with native Dart implementation.

Unlike DartBlockCustomFunction which executes a list of Statements, built-in functions execute native Dart code to provide functionality that cannot be expressed in DartBlock statements (e.g., random number generation).

Inheritance

Constructors

DartBlockNativeFunction({required String name, required DartBlockDataType? returnType, required List<DartBlockVariableDefinition> parameters, required DartBlockValue? implementation(DartBlockArbiter arbiter, List<DartBlockValue> args), required DartBlockNativeFunctionCategory category, required DartBlockNativeFunctionType type, required String description})

Properties

category DartBlockNativeFunctionCategory
final
description String
final
hashCode int
The hash code for this object.
no setteroverride
implementation DartBlockValue? Function(DartBlockArbiter arbiter, List<DartBlockValue> args)
Native Dart implementation of the function.
final
name String
getter/setter pairinherited
parameters List<DartBlockVariableDefinition>
getter/setter pairinherited
returnType DartBlockDataType?
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type DartBlockNativeFunctionType
final

Methods

copy() DartBlockNativeFunction
override
execute(DartBlockArbiter arbiter, List<DartBlockValue> args) DartBlockValue?
Execute the built-in function with the provided arguments.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toScript({DartBlockTypedLanguage language = DartBlockTypedLanguage.java}) String
override
toString() String
A string representation of this object.
inherited

Operators

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