expanded method

String expanded([
  1. Function transform = _nullTransform
])
override

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("")}}";
}