$getProperty method
Get a property by identifier
on this instance
Implementation
@override
$Value? $getProperty(Runtime runtime, String identifier) {
switch (identifier) {
case 'addListener':
return $Function((runtime, target, args) {
final listener = args[0] as EvalCallable;
void fn() => listener.call(runtime, null, []);
_$listenerCache[listener] = fn;
(target!.$value as Listenable).addListener(fn);
return null;
});
case 'removeListener':
return $Function((runtime, target, args) {
(target!.$value as Listenable)
.removeListener(_$listenerCache[args[0] as EvalCallable]!);
return null;
});
}
return _superclass.$getProperty(runtime, identifier);
}