generateClassFields method
Implementation
String generateClassFields(Iterable<Field> fields) {
final result = StringBuffer();
for (final field in fields) {
if (_isEnum(field.type)) {
result.writeln(' final String ${field.name};');
} else if (field.type.generics.length == 1 && _isEnum(field.type.generics[0])) {
result.writeln(' final ${field.type.name}<String> ${field.name};');
} else {
result.writeln(' final ${field.type.displayName} ${field.name};');
}
}
return result.toString();
}