templateVariables property
String
templateVariables
Returns the _templateVariables
field as a JSON string.
Throws FormatException if type is not MessageContentType.template.
This shouldn't happen if the class is initialised correctly.
Implementation
String get templateVariables {
if (type != MessageContentType.template) {
throw FormatException('Not a template', type);
}
return json.encode(_templateVariables);
}