From 624a64b33d1b4bccf6b42e898b0dfba9861d0a2b Mon Sep 17 00:00:00 2001 From: David Morgan Date: Mon, 11 Aug 2025 16:03:17 +0200 Subject: [PATCH] Stop using deprecated Annotatable in public API. --- source_gen/lib/src/generator.dart | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/source_gen/lib/src/generator.dart b/source_gen/lib/src/generator.dart index 60f06299..32ec95d3 100644 --- a/source_gen/lib/src/generator.dart +++ b/source_gen/lib/src/generator.dart @@ -62,23 +62,12 @@ class InvalidGenerationSource implements Exception { InvalidGenerationSource( this.message, { - Annotatable? annotatable, this.todo = '', - // ignore: deprecated_member_use until analyzer 7 support is dropped. - Element2? element, - ElementDirective? elementDirective, - Fragment? fragment, + this.element, + this.elementDirective, + this.fragment, this.node, - }) : element = - element ?? - // ignore: deprecated_member_use until analyzer 7 support is dropped. - (annotatable is Element2 ? annotatable : null) as Element2?, - elementDirective = - elementDirective ?? - (annotatable is ElementDirective ? annotatable : null), - fragment = - fragment ?? - (annotatable is Fragment ? annotatable : null) as Fragment?; + }); @override String toString() {