api/models/variable_schema library

Classes

VariableSchema
Authoring metadata for one {{ name }} placeholder a campaign declares.

Constants

eventNamespace → const String
userNamespace → const String
The two sources a context variable reads from, by token prefix.

Functions

formatCopyNumber(double value) → String
Prints value for copy: at most four decimals, no trailing zeros, "" for a non-finite value.
normalizeContextVariable(Map<String, dynamic> entry) → VariableSchema?
Parses one raw entry from templateConfig.contextVariables into a declaration named by its token, e.g. user.age. Returns null when the namespace or key is missing or unusable.
normalizeVariable(Map<String, dynamic> entry) → VariableSchema?
Parses one raw entry from templateConfig.variables. Returns null when the entry lacks a valid name.