getSubclassesFromFile method

List<ClassDeclaration> getSubclassesFromFile(
  1. String superclassName,
  2. Uri fileUri
)

Implementation

List<ClassDeclaration> getSubclassesFromFile(
  String superclassName,
  Uri fileUri,
) {
  return _getFileAstRoot(fileUri)
      .declarations
      .whereType<ClassDeclaration>()
      .where((c) =>
          c.extendsClause?.superclass.name2.toString() == superclassName)
      .toList();
}