expanded method
Expand this string out into a printed form. The function f
will be
applied to any sub-messages, allowing this to be used to generate a form
suitable for a wide variety of translation file formats.
Implementation
String expanded([Function transform = _nullTransform]) {
fullMessageForClause(String key) =>
key + '{' + transform(parent, this[key]).toString() + '}';
var clauses = attributeNames
.where((key) => this[key] != null)
.map(fullMessageForClause)
.toList();
return "{$mainArgument,$icuMessageName, ${clauses.join("")}}";
}