toCollectionField method

Field toCollectionField(
  1. FieldElement field,
  2. ClassElement collectionClass
)

Implementation

Field toCollectionField(FieldElement field, ClassElement collectionClass) {
  return Field((m) => m
    ..name = field.name
    ..type = refer("late ${collectionClass.name}")
    // ..assignment = Code("${collectionClass.name}(this)")
    ..modifier = FieldModifier.var$);
}