VariableScope class

An immutable set of runtime variables a surface is rendered against, with convenience methods for interpolating a single string.

Constructors

VariableScope(Map<String, dynamic> variables, [Map<String, String> types = const {}])
const
VariableScope.fromSchemas(List<VariableSchema> schemas, Map<String, dynamic>? cepVars)
Builds a scope by resolving each declared schemas entry against the runtime CEP cepVars payload. The winning value follows the chain CEP payload → fallbackValue""; number-typed variables are coerced numerically so they can take part in {{ a + b }} arithmetic.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
types Map<String, String>
Type map for arithmetic: "number" entries participate in arithmetic expressions; everything else is plain-substitution only.
final
variables Map<String, dynamic>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(String text) String
Replaces every {{ … }} token in text. A plain {{ identifier }} is a direct lookup; anything else is evaluated as an arithmetic expression over the scope's number-typed variables (collapsing to "" on any error).
resolveTyped(String text) Object?
Resolves text to a type-preserving value. See resolveValue.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

empty → const VariableScope
No variables in scope — every placeholder collapses to empty.