Repository: flutter
Issue: TextField inside CheckboxListTile results in flakey calls to onChanged
Labels: a: text input,framework,f: material design,has reproducible steps,P2,workaround available,team-text-input,triaged-text-input,found in release: 3.24,found in release: 3.27

### Steps to reproduce

1. Create a `CheckboxListTile` with an `onChanged` that changes its `selected` property, and its `title` being a `TextField`.
2. Click on the `TextField`. (I have only tried this on web on desktop.)

### Expected results

I would expect consistent behavior: either `onChanged` is called or it is not. Out of these options I would probably expect it not to be called: I think the user is probably trying to edit the text in the `TextField` without changing the selection/checkbox status of the `CheckboxListTile`.

### Actual results

_Sometimes_ the `onChanged` handler is called, and _sometimes_ it is not. There doesn't seem to be a clear pattern. It can happen when the `TextField` already has focus, or if it's receiving focus via the tap.

I suspect this has to do with how things are resolved in the gesture arena. If one wraps the `TextField` in a `GestureDetector`:

```dart
title: GestureDetector(
  behavior: HitTestBehavior.opaque,
  onTap: () {},
  child: const TextField(),
)
```

then the problem seems to disappear (but it's hard to be sure because of the flakeyness).

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() => runApp(const CheckboxListTileApp());

class CheckboxListTileApp extends StatelessWidget {
  const CheckboxListTileApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(useMaterial3: true),
      home: const CheckboxListTileExample(),
    );
  }
}

class CheckboxListTileExample extends StatefulWidget {
  const CheckboxListTileExample({super.key});

  @override
  State<CheckboxListTileExample> createState() => _CheckboxListTileExampleState();
}

class _CheckboxListTileExampleState extends State<CheckboxListTileExample> {
  bool isChecked = false;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('CheckboxListTile Sample')),
      body: Center(
        child: CheckboxListTile(
          value: isChecked,
          selected: isChecked,
          selectedTileColor: Colors.green[100],
          onChanged: (bool? value) {
            setState(() => isChecked = value!);
          },
          title: const TextField(),
        ),
      ),
    );
  }
}
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

The first `onChanged` call happens at around **0:38 (!)**, and then there's a few more.

[checkboxlisttile_textfield_flakeyness.webm](https://github.com/user-attachments/assets/ef8a5525-b6cc-40dc-8dfb-80c327c7aac6)

</details>


### Logs

_No response_

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.24.5, on Ubuntu 24.04.1 LTS 6.8.0-48-generic, locale en_US.UTF-8)
    • Flutter version 3.24.5 on channel stable at /home/abc/code/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dec2ee5c1f (5 days ago), 2024-11-13 11:13:06 -0800
    • Engine revision a18df97ca5
    • Dart version 3.5.4
    • DevTools version 2.37.3

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/abc/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /snap/android-studio/161/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 18.1.3 (1ubuntu1)
    • cmake version 3.28.3
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[✓] Android Studio (version 2024.1)
    • Android Studio at /snap/android-studio/161
    • Flutter plugin version 81.0.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)

[✓] VS Code (version 1.95.1)
    • VS Code at /snap/code/current/usr/share/code
    • Flutter extension version 3.100.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 24.04.1 LTS 6.8.0-48-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 131.0.6778.69

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

</details>