StructuredFieldItem.fromQueryFilterFields constructor
StructuredFieldItem.fromQueryFilterFields({})
Implementation
factory StructuredFieldItem.fromQueryFilterFields({
required DJson json,
required List<Field> andOrStructure,
required List<Field> valueStructure,
}) {
final List<DynamicFieldItem> items = [];
final Json effectiveJson = castToJson(json);
if (_isConditionFieldData(effectiveJson)) {
for (final Field field in andOrStructure) {
items.add(DynamicFieldItem.fromField(field, value: effectiveJson[field.id]));
}
} else {
for (final Field field in valueStructure) {
items.add(DynamicFieldItem.fromField(field, value: effectiveJson[field.id]));
}
}
return StructuredFieldItem(items: items);
}