turnInterpolationBackIntoStringForm method

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

Implementation

String turnInterpolationBackIntoStringForm(Message message, dynamic chunk) {
  if (chunk is String) {
    return Message.escapeString(chunk);
  } else if (chunk is int) {
    return r'${message.arguments[chunk]}';
  } else if (chunk is Message) {
    return chunk.toCode();
  } else {
    throw ArgumentError.value(chunk, 'Unexpected value in Intl.message');
  }
}