build method
String?
build(
- Object? context, {
- bool asElement = true,
- bool resolveDSX = true,
- QueryElementProvider? elementProvider,
- IntlMessageResolver? intlMessageResolver,
override
Implementation
@override
String? build(Object? context,
{bool asElement = true,
bool resolveDSX = true,
QueryElementProvider? elementProvider,
IntlMessageResolver? intlMessageResolver}) {
if (intlMessageResolver == null) return '';
Map<String, dynamic>? parameters;
if (context is Map<String, dynamic>) {
parameters = context;
} else if (context is Map) {
parameters =
context.map((key, value) => MapEntry('$key', value as dynamic));
} else if (context is DOMContext) {
parameters = context.variables;
}
var s = intlMessageResolver(key, parameters);
return s;
}