findKeyAndvalue method
void
findKeyAndvalue(
- dynamic varName,
- dynamic val,
- dynamic usedKeys,
- dynamic commonKeys,
- dynamic langKeys,
Implementation
void findKeyAndvalue(varName, val, usedKeys, commonKeys, langKeys) {
final key = val.getField('_key').toStringValue();
if (usedKeys.containsKey(key) == true) {
throw Exception(
'Duplicated key "$key" defined in "${usedKeys[key]}" and "$varName"');
}
usedKeys[key] = varName;
if (val.getField('common').toBoolValue() == true) {
commonKeys[key] = val.getField('_value').toStringValue();
} else {
langKeys[key] = val.getField('_value').toStringValue();
}
}