get static method
Get translated text.
Get the translation by specifying the key
.
By specifying defaultValue
,
you can determine the value if key
is not found.
Implementation
static String get(String key, {String? defaultValue}) {
if (!(_document?.containsKey(key) ?? false)) {
return defaultValue ?? key;
}
return _document?[key] ?? defaultValue ?? key;
}