shouldBuildFor method
This is used to determine if the builder should be run for a given BuildCandidate.
Implement this method to check if the candidate matches criteria for this builder, such as having top level metadata, specific type of elements (classes, enums ..etc), or matching file patterns.
Implementation
@override
bool shouldBuildFor(BuildCandidate candidate) {
return candidate.isDartSource && candidate.hasTopLevelMetadata;
}