isCachePath function

bool isCachePath(
  1. String relativePath
)

Implementation

bool isCachePath(String relativePath) {
  final segments = relativePath.replaceAll('\\', '/').split('/');
  return segments.isNotEmpty &&
      ({'.dart_tool', 'build', 'coverage'}.contains(segments.first) ||
          (segments.length > 2 &&
              segments.skip(1).take(segments.length - 2).contains('coverage')));
}