translate method

String translate(
  1. String key, {
  2. Map<String, dynamic>? args,
})

Implementation

String translate(String key, {Map<String, dynamic>? args}) {
  var translation = _getTranslation(key, _translations);

  if (translation != null && args != null) {
    translation = _assignArguments(translation, args);
  }

  return translation ?? key;
}