JavaScriptEvaluator class
Global JavaScript evaluator singleton.
Must be initialized before use. Defaults to NoOpJsEvaluator.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → JsEvaluator
-
Gets the current JavaScript evaluator instance.
no setter
- isConfigured → bool
-
Returns true if a JavaScript evaluator has been set.
no setter
Static Methods
-
dispose(
) → void - Disposes the JavaScript evaluator resources.
-
evaluate(
String code, Map< String, dynamic> context) → dynamic - Evaluates JavaScript code with the given context.
-
setEvaluator(
JsEvaluator evaluator) → void - Sets the JavaScript evaluator implementation.
-
validateCode(
String code) → void - Validates that JavaScript code is safe to execute.