localizes static method
Implementation
static List<String> localizes(
String key, {
String? name,
List<String>? defaultValue,
bool applyNumber = false,
bool applyRtl = false,
String Function(String)? replace,
Map<String, Object?>? args,
}) {
Iterable<String>? value = i
._trs(
key,
name: name,
defaultValue: defaultValue,
)
?.whereType<String>();
if (value == null || value.isEmpty) value = defaultValue ?? [];
if (applyNumber) value = value.map((e) => i._trN(e, applyRtl: applyRtl));
if (args != null) value = value.map((e) => e.replace(args));
if (replace != null) value = value.map(replace);
return value.toList();
}