VariableSchema class

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

Two lists in templateConfig declare them, and both parse to this type:

  • variables — custom variables, named in lowercase (coupon).
  • contextVariables — a Digia-managed campaign's user attributes and event properties, named by their token (user.age, event.orderValue).

type determines how the value is handled at render time:

  • "string" — substituted as-is.
  • "number" — printed like 199 rather than 199.0, and usable in arithmetic expressions inside {{ }}.
  • "bool" — printed as true / false. Only context variables use it.

fallbackValue is the dashboard-declared default. sampleValue is a legacy alias of fallbackValue that the dashboard still writes. Null means no fallback.

Constructors

VariableSchema({required String name, required String type, required String? fallbackValue})
const

Properties

fallbackValue → String?
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(Object? raw) → String
Resolves raw through runtime value → fallbackValue → "", always as text of this type. A value that does not fit the type is skipped like an empty one. Never throws.
toString() → String
A string representation of this object.
inherited

Operators

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