translate method

String translate(
  1. String localizedValues
)

Implementation

String translate(String localizedValues) {

  if (_localizedStrings.isEmpty) {
    return localizedValues;
  } else {
    final index = _localizedStrings.indexWhere(
          (medium) => medium.code == localizedValues,
    );

    return index != -1 ? _localizedStrings[index].message : localizedValues;
  }
}