findUnusedAssets method
Identifies assets not referenced in code.
Implementation
Set<String> findUnusedAssets(
List<String> allAssetPaths,
Set<String> usedAssetPaths,
String projectRoot,
) {
final unused = <String>{};
for (final assetPath in allAssetPaths) {
final normalizedKey = normalizeAssetKey(assetPath, projectRoot);
if (!usedAssetPaths.contains(normalizedKey)) {
unused.add(assetPath);
}
}
return unused;
}