Repository: flutter
Issue: pairwiseCompare produces confusing 'Which: has <null> which is not  <null> at index null' on Type mismatch
Labels: waiting for customer response,in triage

### Steps to reproduce

1. Add test from code sample to any flutter project
2. run test

### Expected results

Should not use <null> in place of actual values and omit misleading `index null` message. 

Another small nit: there is a double space before the second `<null>`.

### Actual results

```
[...]
Expected: pairwise  ['a']
  Actual: [1]
   Which: has <null> which is not  <null> at index null
type 'int' is not a subtype of type 'String' in type cast at #0      _PairwiseCompare.typedMatches (package:matcher/src/iterable_matchers.dart:266:44)
[...]
```

### Code sample

<details open><summary>Code sample</summary>

```dart
test('throws has <null> which is not description <null> at index null', () {
  expect([1], pairwiseCompare(['a'], (String a, String b) => a == b, ''));
});
```

</details>

### Logs

<details><summary>Logs</summary>

```console
derdilla@dilladesk ~/code/ff_bug % flutter test
00:01 +0: throws has <null> which is not description <null> at index null                                                                    
#0      FeatureMatcher.describeMismatch (package:matcher/src/feature_matcher.dart:23:22)
#1      _expect.<anonymous closure> (package:matcher/src/expect/expect.dart:81:13)
#2      _expect (package:matcher/src/expect/expect.dart:144:17)
#3      expect (package:matcher/src/expect/expect.dart:56:3)
#4      expect (package:flutter_test/src/widget_tester.dart:480:18)
#5      main.<anonymous closure> (file:///home/derdilla/code/ff_bug/test/widget_test.dart:5:5)
#6      Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:215:19)
<asynchronous suspension>
#7      Declarer.test.<anonymous closure> (package:test_api/src/backend/declarer.dart:213:7)
<asynchronous suspension>
#8      Invoker._waitForOutstandingCallbacks.<anonymous closure> (package:test_api/src/backend/invoker.dart:258:9)
<asynchronous suspension>

00:01 +0 -1: throws has <null> which is not description <null> at index null [E]                                                             
  Expected: pairwise  ['a']
    Actual: [1]
     Which: has <null> which is not  <null> at index null
  type 'int' is not a subtype of type 'String' in type cast at #0      _PairwiseCompare.typedMatches (package:matcher/src/iterable_matchers.dart:266:44)
  #1      FeatureMatcher.matches (package:matcher/src/feature_matcher.dart:16:42)
  #2      _expect (package:matcher/src/expect/expect.dart:138:30)
  #3      expect (package:matcher/src/expect/expect.dart:56:3)
  #4      expect (package:flutter_test/src/widget_tester.dart:480:18)
  #5      main.<anonymous closure> (file:///home/derdilla/code/ff_bug/test/widget_test.dart:5:5)
  #6      Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:215:19)
  <asynchronous suspension>
  #7      Declarer.test.<anonymous closure> (package:test_api/src/backend/declarer.dart:213:7)
  <asynchronous suspension>
  #8      Invoker._waitForOutstandingCallbacks.<anonymous closure> (package:test_api/src/backend/invoker.dart:258:9)
  <asynchronous suspension>
  
  
  package:matcher                                     expect
  package:flutter_test/src/widget_tester.dart 480:18  expect
  test/widget_test.dart 5:5                           main.<fn>
  

To run this test again: /home/derdilla/.local/flutter/bin/cache/dart-sdk/bin/dart test /home/derdilla/code/ff_bug/test/widget_test.dart -p vm --plain-name 'throws has <null> which is not description <null> at index null'
00:01 +0 -1: Some tests failed.        
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.27.3, on Arch Linux 6.12.10-zen1-1-zen, locale en_US.UTF-8)
    • Flutter version 3.27.3 on channel stable at /home/derdilla/.local/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c519ee916e (6 days ago), 2025-01-21 10:32:23 -0800
    • Engine revision e672b006cb
    • Dart version 3.6.1
    • DevTools version 2.40.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
    • Android SDK at /home/derdilla/.android
    • Platform android-35, build-tools 35.0.1
    • ANDROID_HOME = /home/derdilla/.android
    • Java binary at: /sbin/java
    • Java version OpenJDK Runtime Environment (build 21.0.6+7)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /sbin/chromium

[✓] Linux toolchain - develop for Linux desktop
    • clang version 19.1.7
    • cmake version 3.31.5
    • ninja version 1.12.1
    • pkg-config version 2.3.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/linux-android-setup for detailed instructions).

[✓] IntelliJ IDEA Ultimate Edition (version 2024.3)
    • IntelliJ at /home/derdilla/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate
    • Flutter plugin version 83.0.4
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Arch Linux 6.12.10-zen1-1-zen
    • Chrome (web)    • chrome • web-javascript • Chromium 132.0.6834.110 Arch Linux

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
flutter doctor -v  4.65s user 0.58s system 188% cpu 2.770 total
```

</details>