Open Noobware1 opened 10 months ago
You can use a $Function (or maybe actually a $Closure, I don't remember)
Hi @Noobware1 were you able to resolve this issue?
I have a similar issue where from the code that is being evaluated I want to pass a function to the test
property.
bridgeObject.test = () => "asd";
In the Bridges Class:
@override
void $setProperty(Runtime runtime, String identifier, $Value value) {
switch (identifier) {
case 'test':
test = value.$value; // UnimplementedError
}
}
value.$value
and value.$reified
have their values set to UnimplementedError
.
The runtimeType
is equal to Type (EvalFunctionPtr)
.
@ethanblake4 maybe you have a better idea on what to do?
Like the badCertificateCallback on Httpclient which requires type
(bool Function(X509Certificate cert, String host, int port)?)
how would I set it using $setProperty?