generateForElement function

Future<Map<String, MethodDeclaration>> generateForElement(
  1. Element element
)

Implementation

Future<Map<String, MethodDeclaration>> generateForElement(
    Element element) async {
  final classVisitor = ClassVisitor();
  final Map<String, MethodDeclaration> methodAstNodes = {};

  element.visitChildren(classVisitor);
  for (final method in classVisitor.methods.entries) {
    final node =
        (await getResolvedAstNodeForElement(method.value)) as MethodDeclaration;
    methodAstNodes[method.key] = node;
  }
  return methodAstNodes;
}