$Function class

An implementation of EvalFunction that wraps an existing Dart function for use in dart_eval.

The wrapped function should be of the type

$Value? Function(Runtime runtime, $Value? target, List<$Value?> args)

The target is the object that the function is being called on, or null if the function is being called statically.

The args are the arguments passed to the function.

In dynamic invocation / closure contexts such as when passing a function as an argument, use $Closure instead.

Inheritance

Constructors

$Function(EvalCallableFunc func)
const

Properties

$reified → dynamic
Fully reify the underlying value so it can be used in a Dart context. For example, recursively transform collections into their underlying $values.
no setteroverride
$value → dynamic
The backing Dart value of this $Value
no setteroverride
func EvalCallableFunc
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

$getProperty(Runtime runtime, String identifier) $Value?
Get a property by identifier on this instance
override
$getRuntimeType(Runtime runtime) int
override
$setProperty(Runtime runtime, String identifier, $Value value) → void
Set a property by identifier on this instance to value
inherited
call(Runtime runtime, $Value? target, List<$Value?> args) $Value?
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Constants

$declaration → const BridgeClassDef