requiresDirectiveChangeDetector property

bool requiresDirectiveChangeDetector

Whether the directive requires a change detector class to be generated.

DirectiveChangeDetector classes should only be generated if they reduce the amount of duplicate code. Therefore we check for the presence of host bindings to move from each call site to a single method.

Implementation

bool get requiresDirectiveChangeDetector =>
    metadataType == CompileDirectiveMetadataType.Directive &&
    hostProperties.isNotEmpty;