ExpressionSandbox class

Configuration for expression evaluation sandboxing.

Provides configurable limits to prevent runaway or deeply nested expressions from consuming excessive resources.

Constructors

ExpressionSandbox({int timeout = 1000, int maxDepth = 32, int maxIterations = 10000, int maxMemoryBytes = 1024 * 1024})
const
ExpressionSandbox.fromJson(Map<String, dynamic> json)
Create from JSON config (e.g., from runtime definition)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
maxDepth int
Maximum nesting depth for recursive expression evaluation. Defaults to 32.
final
maxIterations int
Maximum iterations for aggregate operations (filter/reduce/map on lists). Defaults to 10000.
final
maxMemoryBytes int
Maximum memory usage approximation for expression results. Defaults to 1MB. Enforced via result size limits since Dart does not expose direct memory measurement.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout int
Maximum time allowed for a single expression evaluation (in milliseconds). Defaults to 1000ms.
final

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