File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,15 @@ class MultiplierGenerator extends GeneratorForAnnotation<Multiplier> {
1919
2020 return 'num ${element .name3 }Multiplied() => ${element .name3 } * $numValue ;' ;
2121 }
22+
23+ // Override this method to respond to annotations on directives: `import`,
24+ // `export`, `library` and/or `part`.
25+ //
26+ // This generator doesn't respond to such annotations, so do nothing.
27+ @override
28+ dynamic generateForAnnotatedDirective (
29+ ElementDirective directive,
30+ ConstantReader annotation,
31+ BuildStep buildStep,
32+ );
2233}
Original file line number Diff line number Diff line change 44 do resolution need to switch to the new API, see
55 https://github.com/dart-lang/sdk/blob/main/pkg/analyzer/doc/element_model_migration_guide.md .
66 For questions please use https://github.com/dart-lang/build/discussions .
7+ - ** Breaking Change** : annotations are now reported separately for elements
8+ and directives. If you use ` TypeChecker().annotatedWith() ` , see also
9+ the new ` TypeChecker().libraryDirectivesAnnotatedWith() ` . If you use
10+ ` GeneratorForAnnotation ` see the new ` generateForAnnotatedDirective ` .
711- Require ` build: ^3.0.0 `
812- Updated the minimum package versions for a number of dependencies.
913- Require Dart 3.7.0
You can’t perform that action at this time.
0 commit comments