api/internal/variable_scope library

Classes

VariableScope
An immutable set of runtime variables a surface is rendered against, with convenience methods for interpolating a single string.
VariableScopeProvider
Carries the active VariableScope down the widget tree so descendants can interpolate copy at draw time without receiving the variables as a prop. Mirrors EngageActionContextScope.

Functions

bindContextVariables(List<VariableSchema> schemas, {required Map<String, dynamic> userAttributes, Map<String, Object?> eventProperties = const <String, Object?>{}}) → Map<String, String>
Looks up the runtime value of each context variable in schemas — user.<key> from userAttributes, event.<key> from eventProperties — keyed by its token. Custom variables are skipped: the CEP payload carries those. VariableScope.fromSchemas applies types and fallbacks, so a CEP-decided campaign, which declares no context variables, gets an empty map.