getSubclassesFromFile method Null safety

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.name.name == superclassName)
      .toList();
}