Use anyNamed when mocking named arguments (#17996)

diff --git a/packages/flutter_tools/test/ios/cocoapods_test.dart b/packages/flutter_tools/test/ios/cocoapods_test.dart
index bdb77b1..0db5768 100644
--- a/packages/flutter_tools/test/ios/cocoapods_test.dart
+++ b/packages/flutter_tools/test/ios/cocoapods_test.dart
@@ -60,8 +60,8 @@
     fs.directory(fs.path.join(homeDirPath, '.cocoapods', 'repos', 'master')).createSync(recursive: true);
     when(mockProcessManager.run(
       <String>['pod', '--version'],
-      workingDirectory: any,
-      environment: any,
+      workingDirectory: anyNamed('workingDirectory'),
+      environment: anyNamed('environment'),
     )).thenAnswer((_) => resultOfPodVersion());
     when(mockProcessManager.run(
       <String>['pod', 'install', '--verbose'],
@@ -205,7 +205,7 @@
       );
       verifyNever(mockProcessManager.run(
         argThat(containsAllInOrder(<String>['pod', 'install'])),
-        workingDirectory: any,
+        workingDirectory: anyNamed('workingDirectory'),
         environment: anyNamed('environment'),
       ));
       expect(testLogger.errorText, contains('not installed'));
@@ -227,7 +227,7 @@
         expect(e, const isInstanceOf<ToolExit>());
         verifyNever(mockProcessManager.run(
           argThat(containsAllInOrder(<String>['pod', 'install'])),
-          workingDirectory: any,
+          workingDirectory: anyNamed('workingDirectory'),
           environment: anyNamed('environment'),
         ));
       }
@@ -438,7 +438,7 @@
       expect(didInstall, isFalse);
       verifyNever(mockProcessManager.run(
         argThat(containsAllInOrder(<String>['pod', 'install'])),
-        workingDirectory: any,
+        workingDirectory: anyNamed('workingDirectory'),
         environment: anyNamed('environment'),
       ));
     }, overrides: <Type, Generator>{