Version 2.19.0-36.0.dev

Merge commit '4359108a8bb2c3939b84ccbadbec070e1a78fbb3' into 'dev'
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
index 79ac1aa..a6e05f3 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_diagnostic_property_reference.dart
@@ -12,6 +12,7 @@
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:collection/collection.dart';
 
 class AddDiagnosticPropertyReference extends CorrectionProducer {
   @override
@@ -113,8 +114,10 @@
       builder.writeln("$constructorName('${node.name}', ${node.name}));");
     }
 
-    final debugFillProperties =
-        classDeclaration.getMethod('debugFillProperties');
+    final debugFillProperties = classDeclaration.members
+        .whereType<MethodDeclaration>()
+        .where((e) => e.name.name == 'debugFillProperties')
+        .singleOrNull;
     if (debugFillProperties == null) {
       var location = utils.prepareNewMethodLocation(classDeclaration);
       if (location == null) {
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index f3b6f02..f7cf1fc 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,6 +1,9 @@
 ## 4.4.0-dev
 * Deprecated `ClassDeclaration.isAbstract`, use `abstractKeyword` instead.
 * Deprecated `ClassTypeAlias.isAbstract`, use `abstractKeyword` instead.
+* Deprecated `ClassOrMixinDeclaration.getField`, filter `members` instead.
+* Deprecated `ClassOrMixinDeclaration.getMethod`, filter `members` instead.
+* Deprecated `ClassDeclaration.getConstructor`, filter `members` instead.
 
 ## 4.3.1
 * Fix `identifier` for `LibraryExportElement` and `LibraryImportElement`.
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index 124034e..74bd94d 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -860,6 +860,7 @@
   ///
   /// If the [name] is `null` then the default constructor will be searched
   /// for.
+  @Deprecated('Filter members instead')
   ConstructorDeclaration? getConstructor(String? name);
 }
 
@@ -900,10 +901,12 @@
 
   /// Returns the field declared in the class/mixin with the given [name], or
   /// `null` if there is no such field.
+  @Deprecated('Filter members instead')
   VariableDeclaration? getField(String name);
 
   /// Returns the method declared in the class/mixin with the given [name], or
   /// `null` if there is no such method.
+  @Deprecated('Filter members instead')
   MethodDeclaration? getMethod(String name);
 }
 
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 3f9b7dd..00f3d6b 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -1699,6 +1699,7 @@
   @override
   E? accept<E>(AstVisitor<E> visitor) => visitor.visitClassDeclaration(this);
 
+  @Deprecated('Filter members instead')
   @override
   ConstructorDeclaration? getConstructor(String? name) {
     int length = _members.length;
@@ -1795,6 +1796,7 @@
     _typeParameters = _becomeParentOf(typeParameters as TypeParameterListImpl?);
   }
 
+  @Deprecated('Filter members instead')
   @override
   VariableDeclaration? getField(String name) {
     int memberLength = _members.length;
@@ -1816,6 +1818,7 @@
     return null;
   }
 
+  @Deprecated('Filter members instead')
   @override
   MethodDeclaration? getMethod(String name) {
     int length = _members.length;
diff --git a/pkg/analyzer/test/dart/ast/ast_test.dart b/pkg/analyzer/test/dart/ast/ast_test.dart
index 0962fbe..f70c0a3 100644
--- a/pkg/analyzer/test/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/dart/ast/ast_test.dart
@@ -42,6 +42,7 @@
 
 @reflectiveTest
 class ClassDeclarationTest extends ParserTestCase {
+  @Deprecated('Filter members instead')
   void test_getConstructor() {
     List<ConstructorInitializer> initializers = <ConstructorInitializer>[];
     ConstructorDeclaration defaultConstructor =
@@ -69,6 +70,7 @@
     expect(clazz.getConstructor("noSuchConstructor"), isNull);
   }
 
+  @Deprecated('Filter members instead')
   void test_getField() {
     VariableDeclaration aVar = AstTestFactory.variableDeclaration("a");
     VariableDeclaration bVar = AstTestFactory.variableDeclaration("b");
@@ -85,6 +87,7 @@
     expect(clazz.getField("noSuchField"), isNull);
   }
 
+  @Deprecated('Filter members instead')
   void test_getMethod() {
     MethodDeclaration aMethod = AstTestFactory.methodDeclaration(
         null,
diff --git a/pkg/analyzer/test/generated/nnbd_parser_test.dart b/pkg/analyzer/test/generated/nnbd_parser_test.dart
index 62c9f59..54f27bc 100644
--- a/pkg/analyzer/test/generated/nnbd_parser_test.dart
+++ b/pkg/analyzer/test/generated/nnbd_parser_test.dart
@@ -390,7 +390,7 @@
 ''');
     var classDeclaration = unit.declarations.first as ClassDeclaration;
     var constructor =
-        classDeclaration.getConstructor(null) as ConstructorDeclaration;
+        classDeclaration.members.whereType<ConstructorDeclaration>().single;
 
     // Object? o
     var parameter =
@@ -436,7 +436,7 @@
 ''');
     var classDeclaration = unit.declarations.first as ClassDeclaration;
     var constructor =
-        classDeclaration.getConstructor(null) as ConstructorDeclaration;
+        classDeclaration.members.whereType<ConstructorDeclaration>().single;
 
     // Object? o
     var parameter =
@@ -489,7 +489,7 @@
 ''');
     var classDeclaration = unit.declarations.first as ClassDeclaration;
     var constructor =
-        classDeclaration.getConstructor(null) as ConstructorDeclaration;
+        classDeclaration.members.whereType<ConstructorDeclaration>().single;
 
     // Object? o
     var parameter =
diff --git a/pkg/analyzer_plugin/test/utilities/range_factory_test.dart b/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
index 1bc3b89..28e0205 100644
--- a/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
+++ b/pkg/analyzer_plugin/test/utilities/range_factory_test.dart
@@ -198,7 +198,7 @@
   /// return the list of initializers in that constructor.
   NodeList<ConstructorInitializer> get _constructorInitializers {
     var c = testUnit.declarations[0] as ClassDeclaration;
-    var constructor = c.getConstructor(null) as ConstructorDeclaration;
+    var constructor = c.members.whereType<ConstructorDeclaration>().single;
     return constructor.initializers;
   }
 
diff --git a/tools/VERSION b/tools/VERSION
index b8ca4a2..2637c99 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 19
 PATCH 0
-PRERELEASE 35
+PRERELEASE 36
 PRERELEASE_PATCH 0
\ No newline at end of file