@@ -39,24 +39,12 @@ void checkApiConsistency(String flutterRoot) {
3939 );
4040 // C values: kFlutterAccessibilityFeatureFooBar = 1 << N,
4141 final List <String > embedderEnumValues = getCppEnumValues (
42- sourcePath: path.join (
43- flutterRoot,
44- 'shell' ,
45- 'platform' ,
46- 'embedder' ,
47- 'embedder.h' ,
48- ),
42+ sourcePath: path.join (flutterRoot, 'shell' , 'platform' , 'embedder' , 'embedder.h' ),
4943 enumName: 'FlutterAccessibilityFeature' ,
5044 );
5145 // C++ values: kFooBar = 1 << N,
5246 final List <String > internalEnumValues = getCppEnumClassValues (
53- sourcePath: path.join (
54- flutterRoot,
55- 'lib' ,
56- 'ui' ,
57- 'window' ,
58- 'platform_configuration.h' ,
59- ),
47+ sourcePath: path.join (flutterRoot, 'lib' , 'ui' , 'window' , 'platform_configuration.h' ),
6048 enumName: 'AccessibilityFeatureFlag' ,
6149 );
6250 // Java values: FOO_BAR(1 << N).
@@ -101,35 +89,17 @@ void checkApiConsistency(String flutterRoot) {
10189 className: 'SemanticsAction' ,
10290 );
10391 final List <String > webuiFields = await getDartClassFields (
104- sourcePath: path.join (
105- flutterRoot,
106- 'lib' ,
107- 'web_ui' ,
108- 'lib' ,
109- 'semantics.dart' ,
110- ),
92+ sourcePath: path.join (flutterRoot, 'lib' , 'web_ui' , 'lib' , 'semantics.dart' ),
11193 className: 'SemanticsAction' ,
11294 );
11395 // C values: kFlutterSemanticsActionFooBar = 1 << N.
11496 final List <String > embedderEnumValues = getCppEnumValues (
115- sourcePath: path.join (
116- flutterRoot,
117- 'shell' ,
118- 'platform' ,
119- 'embedder' ,
120- 'embedder.h' ,
121- ),
97+ sourcePath: path.join (flutterRoot, 'shell' , 'platform' , 'embedder' , 'embedder.h' ),
12298 enumName: 'FlutterSemanticsAction' ,
12399 );
124100 // C++ values: kFooBar = 1 << N.
125101 final List <String > internalEnumValues = getCppEnumClassValues (
126- sourcePath: path.join (
127- flutterRoot,
128- 'lib' ,
129- 'ui' ,
130- 'semantics' ,
131- 'semantics_node.h' ,
132- ),
102+ sourcePath: path.join (flutterRoot, 'lib' , 'ui' , 'semantics' , 'semantics_node.h' ),
133103 enumName: 'SemanticsAction' ,
134104 );
135105 // Java values: FOO_BAR(1 << N).
@@ -156,33 +126,16 @@ void checkApiConsistency(String flutterRoot) {
156126 test ('AppLifecycleState enums match' , () async {
157127 // Dart values: _kFooBarIndex = 1 << N.
158128 final List <String > uiFields = await getDartClassFields (
159- sourcePath: path.join (
160- flutterRoot,
161- 'lib' ,
162- 'ui' ,
163- 'platform_dispatcher.dart' ,
164- ),
129+ sourcePath: path.join (flutterRoot, 'lib' , 'ui' , 'platform_dispatcher.dart' ),
165130 className: 'AppLifecycleState' ,
166131 );
167132 final List <String > webuiFields = await getDartClassFields (
168- sourcePath: path.join (
169- flutterRoot,
170- 'lib' ,
171- 'web_ui' ,
172- 'lib' ,
173- 'platform_dispatcher.dart' ,
174- ),
133+ sourcePath: path.join (flutterRoot, 'lib' , 'web_ui' , 'lib' , 'platform_dispatcher.dart' ),
175134 className: 'AppLifecycleState' ,
176135 );
177136 // C++ values: kFooBar = 1 << N.
178137 final List <String > internalEnumValues = getCppEnumClassValues (
179- sourcePath: path.join (
180- flutterRoot,
181- 'shell' ,
182- 'platform' ,
183- 'common' ,
184- 'app_lifecycle_state.h' ,
185- ),
138+ sourcePath: path.join (flutterRoot, 'shell' , 'platform' , 'common' , 'app_lifecycle_state.h' ),
186139 enumName: 'AppLifecycleState' ,
187140 );
188141 // Java values: FOO_BAR(1 << N).
@@ -286,17 +239,15 @@ class NativeFunctionVisitor extends RecursiveAstVisitor<void> {
286239
287240 @override
288241 void visitNativeFunctionBody (NativeFunctionBody node) {
289- final MethodDeclaration ? method = node
290- .thisOrAncestorOfType <MethodDeclaration >();
242+ final MethodDeclaration ? method = node.thisOrAncestorOfType <MethodDeclaration >();
291243 if (method != null ) {
292244 if (method.parameters != null ) {
293245 check (method.toString (), method.parameters! );
294246 }
295247 return ;
296248 }
297249
298- final FunctionDeclaration ? func = node
299- .thisOrAncestorOfType <FunctionDeclaration >();
250+ final FunctionDeclaration ? func = node.thisOrAncestorOfType <FunctionDeclaration >();
300251 if (func != null ) {
301252 final FunctionExpression funcExpr = func.functionExpression;
302253 if (funcExpr.parameters != null ) {
0 commit comments