evaluate method
Evaluates JavaScript code with the given context.
code - The JavaScript code to execute
context - Variables/data available to the JavaScript code
Returns the result of the JavaScript evaluation, or null if evaluation fails.
Example:
final result = evaluator.evaluate(
'data.price * data.quantity',
{'data': {'price': 10.0, 'quantity': 5}},
);
print(result); // 50.0
Implementation
@override
dynamic evaluate(String code, Map<String, dynamic> context) {
// No-op implementation - just return null
return null;
}