expanded method

  1. @override
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

@override
String expanded([Function transform = _nullTransform]) {
  fullMessageForClause(String key) => '$key{${transform(parent, this[key])}}';
  var clauses =
      attributeNames
          .where((key) => this[key] != null)
          .map(fullMessageForClause)
          .toList();
  return "{$mainArgument,$icuMessageName, ${clauses.join("")}}";
}