collectCustomTypeNames function

List<String> collectCustomTypeNames({
  1. List<Method>? methods,
  2. List<Variable>? fields,
})

Implementation

List<String> collectCustomTypeNames(
    {List<Method>? methods, List<Variable>? fields}) {
  final typeNames = <AstCustomType>[
    if (methods != null) ...collectCustomTypeWithMethods(methods),
    if (fields != null) ...collectCustomTypeWithFields(fields)
  ].map((e) => e.type).toSet().toList();

  return typeNames.toSet().toList();
}