From 5b4971c6a885d542926f0cca9926a54e110a4df0 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 31 Aug 2022 08:05:48 -0700 Subject: [PATCH] Update the API check script for the latest Dart analyzer APIs See https://github.com/flutter/flutter/issues/110670 --- tools/api_check/lib/apicheck.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/api_check/lib/apicheck.dart b/tools/api_check/lib/apicheck.dart index 8413cc6f37e95..d85a0dc28055e 100644 --- a/tools/api_check/lib/apicheck.dart +++ b/tools/api_check/lib/apicheck.dart @@ -36,11 +36,11 @@ List getDartClassFields({ final RegExp fieldExp = RegExp(r'_k(\w*)Index'); final List fields = []; for (final CompilationUnitMember unitMember in result.unit.declarations) { - if (unitMember is ClassDeclaration && unitMember.name.name == className) { // ignore: deprecated_member_use + if (unitMember is ClassDeclaration && unitMember.name2.lexeme == className) { for (final ClassMember classMember in unitMember.members) { if (classMember is FieldDeclaration) { for (final VariableDeclaration field in classMember.fields.variables) { - final String fieldName = field.name.name; // ignore: deprecated_member_use + final String fieldName = field.name2.lexeme; final RegExpMatch? match = fieldExp.firstMatch(fieldName); if (match != null) { fields.add(match.group(1)!);