Skip to content

Commit f82cd35

Browse files
authored
Remove unused extension method, replaced in analyzer 8.4.0 (#4119)
With analyzer 8.4.0, `Element` now has a proper instance method, `isDeprecatedWithKind`, which usurps our extension method. πŸŽ‰
1 parent 98d03ad commit f82cd35

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

β€Žlib/src/model/model_element.dartβ€Ž

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -831,16 +831,6 @@ extension on Element {
831831
}
832832
}
833833

834-
// Copied from analyzer's `lib/src/dart/element/extensions.dart`. Re-use that
835-
// extension if it becomes public.
836-
extension on Element {
837-
/// Whether this Element is annotated with a `Deprecated` annotation with a
838-
/// `_DeprecationKind` of [kind].
839-
bool isDeprecatedWithKind(String kind) => metadata.annotations
840-
.where((e) => e.isDeprecated)
841-
.any((e) => e.deprecationKind == kind);
842-
}
843-
844834
// Copied from analyzer's `lib/src/dart/element/extensions.dart`. Re-use that
845835
// extension if it becomes public.
846836
extension ElementAnnotationExtension on ElementAnnotation {

β€Žpubspec.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ environment:
77
sdk: ^3.6.0
88

99
dependencies:
10-
analyzer: ^8.2.0
10+
analyzer: ^8.4.0
1111
args: ^2.4.1
1212
collection: ^1.17.0
1313
crypto: ^3.0.3

0 commit comments

Comments
Β (0)