addField method
Implementation
void addField(Reference type, ParameterElement field) {
_constructorParameters.add(
Parameter((builder) {
builder.name = field.name;
builder.named = true;
builder.required = true;
builder.toThis = true;
}),
);
_fields.add(
Field((builder) {
builder.modifier = FieldModifier.final$;
builder.name = field.name;
builder.type = type;
}),
);
}