toCode method

String toCode()
override

Write out the generated representation of this message. This differs from Plural/Gender in that it prints a literal map rather than named arguments.

Implementation

String toCode() {
  var out = new StringBuffer();
  out.write('\${');
  out.write(dartMessageName);
  out.write('(');
  out.write(mainArgument);
  var args = codeAttributeNames;
  out.write(", {");
  args.fold(out,
      (dynamic buffer, arg) => buffer..write("'$arg': '${this[arg]!.toCode()}', "));
  out.write("})}");
  return out.toString();
}