translate method

String translate(
  1. String key
)

Implementation

String translate(String key) {
  // Return the translation if available, otherwise return the key itself
  return _localizedStrings[key] ?? key;
}