isExcluded method
Whether the file at the absolute filePath is excluded.
Implementation
bool isExcluded(String filePath) {
if (filePath.endsWith('.g.dart')) {
return true;
}
final relative = path.isWithin(root, filePath)
? path.relative(filePath, from: root)
: filePath;
// Globs are always written with forward slashes, even on Windows.
final normalized = path.toUri(relative).path;
return excludeGlobs.any((glob) => glob.matches(normalized));
}