get method
Looks up and evaluates an ICU MessageFormat template by messageId.
Substitutes args into the message pattern according to ICU rules (plurals,
select, numbers, dates). Returns null if messageId is not found in this catalog.
final msg = catalog.get('unread_messages', args: {'count': 4});
See also:
- BloomI18n.translate, which evaluates catalogs with fallback chains.
- formatMessage, the underlying static message evaluation method.
Implementation
String? get(String messageId, {Map<String, Object>? args}) {
final template = _messages[messageId];
if (template == null) return null;
return formatMessage(template, args: args, locale: locale);
}