getMethods function

Implementation

List<FunctionDeclaration> getMethods(CompilationUnit code) {
  return code.childEntities
      .whereType<FunctionDeclaration>()
      .toList()
      .cast<FunctionDeclaration>();
}