turnInterpolationBackIntoStringForm method

dynamic turnInterpolationBackIntoStringForm(
  1. Message message,
  2. dynamic chunk
)

Implementation

turnInterpolationBackIntoStringForm(Message message, chunk) {
  if (chunk is String) return escapeAndValidateString(chunk);
  if (chunk is int) return r"${" + message.arguments[chunk] + "}";
  if (chunk is Message) return chunk.toCode();
  throw new ArgumentError.value(chunk, "Unexpected value in Intl.message");
}