Repository: flutter
Issue: iOS copy/paste bar is available by 3-tap gesture even after TextField has been destroyed
Labels: a: text input,platform-ios,f: cupertino,f: gestures,P2,team-text-input,triaged-text-input

### 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

From my understanding this was introduced sometime between 3.7.9 and 3.10.x

1. Launch app in iOS
2. Use three fingers to tap at the same time (nothing happens)
3. Go to screen with a CupertinoTextField
4. Interact with the TextField
5. Use three fingers to tap at the same time (cut/copy/paste iOS menu appears at top of screen)
6. Change to a different view so that the view with the CupertinoTextField is destroyed
7. Use three fingers to tap at the same time (cut/copy/paste iOS menu appears at top of screen)

### Expected results

I would not expect the 3-tap gesture to show the iOS menu in step 7. 

### Actual results

The 3-tap gesture shows the iOS menu even when there is no TextField present.

### Code sample

<details><summary>Code sample</summary>

```dart
...
CupertinoTextField(
  controller: _textController,
  keyboardType:
      const TextInputType.numberWithOptions(signed: true),
  inputFormatters: [
    FilteringTextInputFormatter.digitsOnly,
  ],
  enableSuggestions: false,
  scribbleEnabled: false,
  enableInteractiveSelection: false,
  enableIMEPersonalizedLearning: false,
  spellCheckConfiguration:
      const SpellCheckConfiguration.disabled(),
  autocorrect: false,
  autofillHints: null,
  contextMenuBuilder: null,
  onTap: () {
    ...
  },
  onChanged: (String value) {
    ...
  },
  onSubmitted: (String value) {
    ...
  },
),
...
@override
void dispose() {
  _textController?.dispose();
  super.dispose();
}
...
```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

![Screenshot 2023-09-30 at 23 34 50](https://github.com/flutter/flutter/assets/146591908/d4b650bf-d506-4dd9-bc8c-5983adfc08ed)

![IMG_4526](https://github.com/flutter/flutter/assets/146591908/0cdb894d-ba62-49ec-b665-a19bb61327be)

</details>


### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel beta, 3.15.0-15.2.pre, on macOS 13.5.2 22G91 darwin-arm64, locale en-GB)
    • Flutter version 3.15.0-15.2.pre on channel beta at /Users/carlhamlet/Documents/ProjectsCarl/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 0d074ced6c (9 days ago), 2023-09-21 10:24:15 -0700
    • Engine revision 453411bcf3
    • Dart version 3.2.0 (build 3.2.0-134.1.beta)
    • DevTools version 2.27.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/carlhamlet/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode-14.2.0.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.13.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /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 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.78.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

[✓] VS Code (version 1.78.2)
    • VS Code at /Users/carlhamlet/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

[✓] Network resources
    • All expected network resources are available.
```

</details>