computeMessageName function

String? computeMessageName(
  1. String name,
  2. String? text,
  3. String? meaning
)

If a message is a string literal without interpolation, compute a name based on that and the meaning, if present.

Implementation

// NOTE: THIS LOGIC IS DUPLICATED IN intl AND THE TWO MUST MATCH.
String? computeMessageName(String name, String? text, String? meaning) {
  if (name != '') return name;
  return meaning == null ? text : '${text}_$meaning';
}