collectCustomTypeWithFields function

List<AstCustomType> collectCustomTypeWithFields(
  1. List<Variable> fields
)

Implementation

List<AstCustomType> collectCustomTypeWithFields(List<Variable> fields) {
  final astTypes = <AstCustomType>[];
  for (final element in fields) {
    final l = element.type.realType().recursiveCustomType();
    if (l.isNotEmpty) {
      astTypes.addAll(l);
    }
  }
  return astTypes;
}