Repository: flutter
Issue: pointerCount is not correct on GestureDetector.onScaleEnd() when quickly releasing both fingers
Labels: framework,f: gestures,has reproducible steps,P2,team-framework,triaged-framework,found in release: 3.24,found in release: 3.25

### Steps to reproduce

1. Touch 1 finger
2. Touch 2 finger 
3. Release both finger

### Expected results

If release both finger one by one => "onScaleEnd 1" -> "onScaleEnd 0" in console.
If release both finger at the same time =>  same as above.

### Actual results

If release both finger one by one => "onScaleEnd 1" -> "onScaleEnd 0" in console.
If release both finger at the same time => only "onScaleEnd 1"  in console.

### Code sample

<details open><summary>Code sample</summary>

```dart
class Test extends StatefulWidget {
  const Test({super.key});

  @override
  State<Test> createState() => _TestState();
}

class _TestState extends State<Test> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: GestureDetector(
        behavior: HitTestBehavior.opaque,
        onScaleEnd: (detail) {
          print("onScaleEnd ${detail.pointerCount}");
        },
        child: SizedBox.expand(),
      ),
    );
  }
}
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.22.3, on macOS 14.0 23A344 darwin-x64, locale en-VN)
    ! Warning: `flutter` on your path resolves to /Users/xuantung/Desktop/Develop/flutter/3.19.6/flutter/bin/flutter, which is not inside
      your current Flutter SDK checkout at /Users/xuantung/Desktop/Develop/flutter/3.22.3/flutter. Consider adding
      /Users/xuantung/Desktop/Develop/flutter/3.22.3/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/xuantung/Desktop/Develop/flutter/3.19.6/flutter/bin/dart, which is not inside your
      current Flutter SDK checkout at /Users/xuantung/Desktop/Develop/flutter/3.22.3/flutter. Consider adding
      /Users/xuantung/Desktop/Develop/flutter/3.22.3/flutter/bin to the front of your path.
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.92.1)
[✓] Connected device (3 available)
    ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the
      same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

! Doctor found issues in 2 categories.

```

</details>