fix android config

This commit is contained in:
2022-04-05 11:25:37 +06:30
parent 2b362cd8de
commit cbd8ddad08
4 changed files with 16 additions and 4 deletions

View File

@@ -28,15 +28,15 @@ class AppTranslations {
get currentLanguage => locale.languageCode;
String text(String key, {List<String>? translationVariables}) {
String value = _localisedValues[key];
String? value = _localisedValues[key];
if (value == null) {
return "$key not found";
}
if (translationVariables != null) {
translationVariables.asMap().forEach((i, s) {
value = value.replaceAll("{$i}", s);
value = value!.replaceAll("{$i}", s);
});
}
return value;
return value!;
}
}