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