fieldsForGenerator property
Mash the element
's fields into a list for serialization or deserialization
Implementation
@visibleForTesting
@visibleForOverriding
String get fieldsForGenerator {
return fields.stableInstanceFields.fold<List<String>>(<String>[], (acc, field) {
final fieldAnnotation = fields.annotationForField(field);
final serialization = addField(field, fieldAnnotation);
if (serialization != null) {
acc.add(serialization);
}
return acc;
}).join(',\n');
}