$localized method
Return the text from a text map with arguments based on current locale
Implementation
String $localized(
Map<String, Map<dynamic, String>> textMap, [
List<dynamic>? arguments,
]) =>
textMap[GetLocalizations.currentLocale ?? GetLocalizations.english]
?.mapTo((Map<dynamic, String> it) => it[this])
?.applyIf(
arguments?.isNotEmpty,
(s) => sprintf(s ?? "", arguments!.map((e) => e ?? "").toList()),
) ??
"";