Repository: flutter
Issue: NestedScrollView allows dragging when there is not enough content to scroll
Labels: framework,f: scrolling,has reproducible steps,P2,team-framework,triaged-framework,found in release: 3.13,found in release: 3.16

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. Run app
2. On NestScrollViewPage put your finger in the list and try to scroll up
3. Go to ListViewPage, put your finger in the list and try to scroll up

### Expected results

Scroll should not work thanks of the usage of `physics: const ClampingScrollPhysics()`.

### Actual results

In NestScrollViewPage, the list is scrollable despite usage of the physics `ClampingScrollPhysics`.
NestScrollViewPage should not recognize ClampingScrollPhysics physics.

I reported by the past a similar issue using the physics `NeverScrollableScrollPhysics`, it is fixed today : https://github.com/flutter/flutter/issues/113753.

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MaterialApp(home: Home()));
}

class Home extends StatefulWidget {
  const Home({super.key});

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
      length: 2,
      child: Builder(builder: (context) {
        return Scaffold(
          bottomNavigationBar: BottomNavigationBar(
            currentIndex: DefaultTabController.of(context).index,
            onTap: (int value) {
              setState(() {
                DefaultTabController.of(context).animateTo(value);
              });
            },
            items: const <BottomNavigationBarItem>[
              BottomNavigationBarItem(
                label: "NestedScrollViewPage",
                icon: Icon(Icons.home),
              ),
              BottomNavigationBarItem(
                label: "ListViewPage",
                icon: Icon(Icons.home),
              ),
            ],
          ),
          backgroundColor: Colors.white,
          body: const TabBarView(
            physics: NeverScrollableScrollPhysics(),
            children: <Widget>[
              NestedScrollViewPage(),
              ListViewPage(),
            ],
          ),
        );
      }),
    );
  }
}

class ListViewPage extends StatelessWidget {
  const ListViewPage({super.key});

  @override
  Widget build(BuildContext context) {
    return ListView(
      physics: const ClampingScrollPhysics(),
      children: <Widget>[
        AppBar(
          title: const Text("Physics working"),
        ),
        for (int index = 0; index < 5; ++index)
          Card(
            child: ListTile(
              onTap: () {},
              leading: const Icon(Icons.search),
              title: Text(index.toString()),
            ),
          ),
      ],
    );
  }
}

class NestedScrollViewPage extends StatelessWidget {
  const NestedScrollViewPage({super.key});

  @override
  Widget build(BuildContext context) {
    return NestedScrollView(
      physics: const ClampingScrollPhysics(),
      headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) => <Widget>[
        const SliverAppBar(
          pinned: false,
          title: Text("Physics not working"),
        ),
      ],
      body: Builder(
        builder: (BuildContext context) => CustomScrollView(
          slivers: <Widget>[
            SliverList(
              delegate: SliverChildBuilderDelegate(
                (context, index) => Card(
                  child: ListTile(
                    onTap: () {},
                    leading: const Icon(Icons.search),
                    title: Text(index.toString()),
                  ),
                ),
                childCount: 5,
              ),
            ),
          ],
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

![issue](https://github.com/flutter/flutter/assets/37028599/803a47db-ada3-4d6c-9c24-d9c8a8139456)

</details>


### Logs

<details><summary>No logs</summary>

```console
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.13.6, on macOS 13.5.2 22G91 darwin-arm64, locale fr-FR)
    • Flutter version 3.13.6 on channel stable at /Users/earminjon/fvm/versions/3.13.6
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ead455963c (10 days ago), 2023-09-26 18:28:17 -0700
    • Engine revision a794cf2681
    • Dart version 3.1.3
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/earminjon/Library/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/earminjon/Library/Android/Sdk
    • Java binary at: /Users/earminjon/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/earminjon/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.2)
    • IntelliJ at /Users/earminjon/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 75.1.4
    • Dart plugin version 232.9559.10

[✓] VS Code (version 1.76.2)
    • VS Code at /Users/earminjon/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64  • Android 14 (API 34) (emulator)
    • macOS (desktop)             • macos         • darwin-arm64   • macOS 13.5.2 22G91 darwin-arm64
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 117.0.5938.149

[✓] Network resources
    • All expected network resources are available.

• No issues found!

```

</details>