getDirective method

DirectiveDefinition? getDirective(
  1. String name
)

Definition for the given directive name, if any exists

Implementation

DirectiveDefinition? getDirective(String name) =>
    directives!.firstWhereOrNull(
      (d) => d.name == name,
    );