@@ -139,7 +139,7 @@ sealed class ExpressionPart with EquatableMixin, SerializableMixin {
139139@JsonSerializable ()
140140class RawValuePart extends ExpressionPart {
141141 /// value of the raw value.
142- final dynamic value;
142+ final String value;
143143
144144 /// Creates a raw value part.
145145 RawValuePart (this .value);
@@ -159,6 +159,10 @@ class RawValuePart extends ExpressionPart {
159159/// `a` and `b` .
160160@JsonSerializable ()
161161class VariablePart extends ExpressionPart {
162+ @JsonKey (defaultValue: '' )
163+ /// the actual string interpolated with variables.
164+ final String valueString;
165+
162166 /// name of the variable
163167 final String variableName;
164168
@@ -168,6 +172,7 @@ class VariablePart extends ExpressionPart {
168172 /// Creates a variable part.
169173 VariablePart ({
170174 required this .variableName,
175+ required this .valueString,
171176 this .jsonPath,
172177 });
173178
@@ -179,10 +184,12 @@ class VariablePart extends ExpressionPart {
179184 /// Duplicates the variable part with the provided values.
180185 VariablePart copyWith ({
181186 String ? variableName,
187+ String ? valueString,
182188 String ? jsonPath,
183189 }) {
184190 return VariablePart (
185191 variableName: variableName ?? this .variableName,
192+ valueString: valueString ?? this .valueString,
186193 jsonPath: jsonPath ?? this .jsonPath,
187194 );
188195 }
0 commit comments