1010// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
1111//.title~
1212
13+ // ignore_for_file: deprecated_member_use
14+
1315import 'package:analyzer/dart/analysis/analysis_context_collection.dart' ;
1416import 'package:analyzer/dart/analysis/results.dart' ;
1517import 'package:analyzer/dart/constant/value.dart' ;
@@ -82,8 +84,7 @@ final class DartAnnotatedClassAnalyzer {
8284 fullFileUri.toString (),
8385 );
8486 if (library is LibraryElementResult ) {
85- final classElements = library.element.topLevelElements
86- .whereType <ClassElement >();
87+ final classElements = library.element.topLevelElements.whereType <ClassElement >();
8788 for (final classElement in classElements) {
8889 final className = classElement.displayName;
8990 if (classNameFilter == null || classNameFilter.hasMatch (className)) {
@@ -138,8 +139,7 @@ final class DartAnnotatedClassAnalyzer {
138139 Set <String >? inclMemberAnnotations,
139140 ) async {
140141 for (final fieldElement in classElement.fields) {
141- if (memberNameFilter == null ||
142- memberNameFilter.hasMatch (fieldElement.displayName)) {
142+ if (memberNameFilter == null || memberNameFilter.hasMatch (fieldElement.displayName)) {
143143 for (final fieldMetadata in fieldElement.metadata) {
144144 final memberAnnotationName = fieldMetadata.element? .displayName;
145145 if (memberAnnotationName != null &&
@@ -199,8 +199,7 @@ final class DartAnnotatedClassAnalyzer {
199199 Set <String >? inclMethodAnnotations,
200200 ) async {
201201 for (final method in classElement.methods) {
202- if (methodNameFilter == null ||
203- methodNameFilter.hasMatch (method.displayName)) {
202+ if (methodNameFilter == null || methodNameFilter.hasMatch (method.displayName)) {
204203 for (final methodMetadata in method.metadata) {
205204 final methodAnnotationName = methodMetadata.element? .displayName;
206205 if (methodAnnotationName != null &&
@@ -217,9 +216,7 @@ final class DartAnnotatedClassAnalyzer {
217216 final fieldNames = element? .children.map ((e) => e.displayName);
218217 if (fieldNames != null ) {
219218 for (final fieldName in fieldNames) {
220- final fieldValue = methodMetadata
221- .computeConstantValue ()
222- ? .getField (fieldName);
219+ final fieldValue = methodMetadata.computeConstantValue ()? .getField (fieldName);
223220 if (fieldValue != null ) {
224221 await onMethodAnnotationField (
225222 OnMethodAnnotationFieldParams (
@@ -267,8 +264,8 @@ final class DartAnnotatedClassAnalyzer {
267264 if (fieldNames != null ) {
268265 for (final fieldName in fieldNames) {
269266 final fieldValue = metadata.computeConstantValue ()? .getField (
270- fieldName,
271- );
267+ fieldName,
268+ );
272269 if (fieldValue != null ) {
273270 await onClassAnnotationField (
274271 OnClassAnnotationFieldParams (
@@ -303,8 +300,7 @@ final class OnAnnotatedClassParams {
303300 });
304301}
305302
306- typedef TOnAnnotatedClassCallback =
307- Future <dynamic > Function (OnAnnotatedClassParams parent);
303+ typedef TOnAnnotatedClassCallback = Future <dynamic > Function (OnAnnotatedClassParams parent);
308304
309305// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
310306
@@ -325,8 +321,9 @@ final class OnClassAnnotationFieldParams {
325321 });
326322}
327323
328- typedef TOnClassAnnotationFieldCallback =
329- Future <dynamic > Function (OnClassAnnotationFieldParams parent);
324+ typedef TOnClassAnnotationFieldCallback = Future <dynamic > Function (
325+ OnClassAnnotationFieldParams parent,
326+ );
330327
331328// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
332329
@@ -345,8 +342,7 @@ final class OnAnnotatedMethodParams {
345342 });
346343}
347344
348- typedef TOnAnnotatedMethodCallback =
349- Future <dynamic > Function (OnAnnotatedMethodParams parent);
345+ typedef TOnAnnotatedMethodCallback = Future <dynamic > Function (OnAnnotatedMethodParams parent);
350346
351347// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
352348
@@ -367,8 +363,9 @@ final class OnMethodAnnotationFieldParams {
367363 });
368364}
369365
370- typedef TOnMethodAnnotationFieldCallback =
371- Future <dynamic > Function (OnMethodAnnotationFieldParams parent);
366+ typedef TOnMethodAnnotationFieldCallback = Future <dynamic > Function (
367+ OnMethodAnnotationFieldParams parent,
368+ );
372369
373370// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
374371
@@ -389,8 +386,7 @@ final class OnAnnotatedMemberParams {
389386 });
390387}
391388
392- typedef TOnAnnotatedMemberCallback =
393- Future <dynamic > Function (OnAnnotatedMemberParams parent);
389+ typedef TOnAnnotatedMemberCallback = Future <dynamic > Function (OnAnnotatedMemberParams parent);
394390
395391// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
396392
@@ -411,8 +407,9 @@ final class OnMemberAnnotationFieldParams {
411407 });
412408}
413409
414- typedef TOnMemberAnnotationFieldsCallback =
415- Future <dynamic > Function (OnMemberAnnotationFieldParams parent);
410+ typedef TOnMemberAnnotationFieldsCallback = Future <dynamic > Function (
411+ OnMemberAnnotationFieldParams parent,
412+ );
416413
417414// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
418415
0 commit comments