Skip to content

Commit e69abb4

Browse files
authored
Stop using deprecated Annotatable in public API. (#780)
1 parent b864909 commit e69abb4

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

source_gen/lib/src/generator.dart

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,12 @@ class InvalidGenerationSource implements Exception {
6262

6363
InvalidGenerationSource(
6464
this.message, {
65-
Annotatable? annotatable,
6665
this.todo = '',
67-
// ignore: deprecated_member_use until analyzer 7 support is dropped.
68-
Element2? element,
69-
ElementDirective? elementDirective,
70-
Fragment? fragment,
66+
this.element,
67+
this.elementDirective,
68+
this.fragment,
7169
this.node,
72-
}) : element =
73-
element ??
74-
// ignore: deprecated_member_use until analyzer 7 support is dropped.
75-
(annotatable is Element2 ? annotatable : null) as Element2?,
76-
elementDirective =
77-
elementDirective ??
78-
(annotatable is ElementDirective ? annotatable : null),
79-
fragment =
80-
fragment ??
81-
(annotatable is Fragment ? annotatable : null) as Fragment?;
70+
});
8271

8372
@override
8473
String toString() {

0 commit comments

Comments
 (0)