Repository: flutter
Issue: GestureDetector vs ListView vs Column - touch events delegate confusion
Labels: framework,f: scrolling,f: gestures,has reproducible steps,P3,team-framework,triaged-framework,found in release: 3.16,found in release: 3.18

### 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

I actually wanted to follow up on one of the _somehow inconclusively_ closed issues #72996 or #23325 - that I'm also so confused about whether `GestureDetector` is supposed to capture all events or not, vs its child that also capture events. Behaviour at the moment seems like (for `v3.16.2`); when the child listens to a touch event (such as tap or drag), it doesn't propagate to `GestureDetector` parent at all. Here is a reproducible minimal application:

```
import 'dart:developer';

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  /// Return a 100 height 100% width tile
  static Widget _tile(int index) {
    return InkWell(
      onTap: () => log('InkWell onTap: $index'),
      child: Container(
        height: 100,
        width: double.infinity,
        color: index % 2 == 0 ? Colors.lightBlue : Colors.grey.shade300,
        child: Center(child: Text('Tile $index')),
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(useMaterial3: true),
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Theme.of(context).colorScheme.inversePrimary,
          title: const Text('Flutter Demo Home Page'),
        ),
        body: GestureDetector(
          onVerticalDragEnd: (DragEndDetails details) => log(
              'GestureDetector onVerticalDragEnd: ${details.primaryVelocity}'),
          onTap: () => log('GestureDetector onTap'),
          child: ListView(
            children: [for (int i = 0; i < 10; i++) _tile(i)],
          ),
        ),
      ),
    );
  }
}
```

Here is the behaviour below but to be honest, I would expect `onVerticalDragEnd` and `onTap` events on `GestureDetector` to be triggered that they do not.


https://github.com/flutter/flutter/assets/1009931/631c2f43-7b44-4ece-9497-309938535d4d

If you comment out the `onTap:` on `InkWell` without even removing it, then the `onTap: () => log('GestureDetector onTap'),` line starts getting called.

https://github.com/flutter/flutter/assets/1009931/8d4d4c58-a534-4766-b826-5852f40195b8

I tried with `ListView.builder()` at some point and it gave the similar results as I remember.

When I tried with a `SingleChildScrollView` wrapped `Column`, it has the same behaviour of `ListView`. However, if I try with "less items" that doesn't exceed the screen height, say 5 items, interestingly it becomes "not really scrollable" (whatever that means) and it does start propagating the drag events now to `GestureDetector`:

https://github.com/flutter/flutter/assets/1009931/9c6dd45a-55b0-4ef9-b82f-a4db248945db

My question is; if `GestureDetector` is capturing touch events with the expected behaviour, what is the point of using it with touchable widgets? Its behaviour is so confusing.



### Expected results

`GestureDetector` to detect all touch events, even if it means a duplicate same event call on its child. For example, I would expect:

```
GestureDetector(
  onTap: () => log('GestureDetector onTap'),
  child: ...,
)
```

this to log `GestureDetector onTap` every time I tap on _absolutely anything_ within its child, whether it's a button or inkwell or any other _tappable_ widget. Same goes with the draggable widgets, such as `ListView`...

### Actual results

`GestureDetector` events get called _sometimes_, depending on if any of its child or children listens to same events.

### Code sample

Code sample provided at the beginning.

### Screenshots or Video

_No response_

### Logs

_No response_

### Flutter Doctor output

Doctor says everything fine and on the latest sable version `3.16.2` before anyone asks..

<details><summary>Doctor output</summary>

```console
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.2, on Microsoft Windows [Version 10.0.22621.2715], locale en-AU)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.4)
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.84.2)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!
```

</details>