JsonIntlValue.fromJson constructor
JsonIntlValue.fromJson(
- dynamic message
Create a translated string from a json object
Implementation
factory JsonIntlValue.fromJson(dynamic message) {
final map = <JsonIntlGender, Map<JsonIntlPlural, String>>{};
if (message is String) {
map[JsonIntlGender.neutral] ??= <JsonIntlPlural, String>{};
map[JsonIntlGender.neutral]![JsonIntlPlural.other] = message;
} else if (message is Map<String, dynamic>) {
_loadGender(map, message);
}
return JsonIntlValue(map);
}