countImportingFiles method

Future<int> countImportingFiles(
  1. String projectPath,
  2. String packageName
)

Count how many project files import packageName. Fast, no AST.

Implementation

Future<int> countImportingFiles(
    String projectPath, String packageName) async {
  final files = await findFilesImporting(projectPath, packageName);
  return files.length;
}