Repository: flutter
Issue:  LateInitializationError: Field 'hasPreviousPage' has not been initialized.
Labels: a: text input,platform-ios,a: production,P2,team-framework,triaged-framework

### 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

It seems this happen when user trying to copy text inside TextFormField. It happened in production, luckily we use Sentry and there is a screenshot attached to this issue. I will attach here to get a better understanding about the issue.

<img height=500 src="https://github.com/flutter/flutter/assets/15975922/096eedba-f5ea-4395-beb2-7ac660931633">

So far, only happened on 1 iOS device:

Architecture | arm64
-- | --
Battery Level | 40%
Boot Time | 2023-09-30T01:18:15.000Z(10 hours before this event)
Charging | False
Family | iOS
Free Memory | 211.1 MiB
Free Storage | 99.5 GiB
Memory Size | 5.5 GiB
Model | iPhone15,3 (D74AP)
Model Id | D74AP
Orientation | portrait
Screen Height Pixels | 932
Screen Resolution | 430x932
Screen Width Pixels | 430
Simulator | False
Storage Size | 238.3 GiB
Usable Memory | 4.6 GiB



### Expected results

No error when user select text inside TextFormFIeld

### Actual results

Error when user select text inside TextFormField, so far only issue on iOS.

### Code sample

<details><summary>Code sample</summary>

```dart
 TextFormField(
          style: TextStyle(
            fontSize: Font.s16,
            fontWeight: Font.bold,
            color: ColorManager.kPrimaryText,
          ),
          controller: addressController,
          focusNode: addressFocusNode,
          autovalidateMode: AutovalidateMode.onUserInteraction,
          validator: (value) => (value ?? '').isEmpty
              ? requiredValidator(value)
              : lengthValidator(value, 5, 50),
          inputFormatters: [
            FilteringTextInputFormatter.deny(RegExp('[\<\>]')),
          ],
          onChanged: (value) {
            removeFirstSpace(
              controller.address,
              value,
            );
          },
          decoration: InputDecoration(
            errorMaxLines: 2,
            labelText: 'Alamat sesuai KTP',
            labelStyle: TextStyle(
              color: ColorManager.kTextDisableBrand,
              fontSize: Font.s16,
              fontWeight: Font.regular,
            ),
            alignLabelWithHint: true,
            contentPadding: EdgeInsets.only(top: 6, bottom: 6),
          ),
          maxLines: null,
          maxLength: 50,
          keyboardType: TextInputType.multiline,
        ),
       
```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details><summary>Logs</summary>

```console
LateError: LateInitializationError: Field 'hasPreviousPage' has not been initialized.
  File "text_selection_toolbar.dart", in _CupertinoTextSelectionToolbarContentState._handlePreviousPage
  File "text_selection_toolbar.dart", line 454, in _CupertinoTextSelectionToolbarContentState._onHorizontalDragEnd
  File "monodrag.dart", line 574, in DragGestureRecognizer._checkEnd.<fn>
  File "recognizer.dart", line 275, in GestureRecognizer.invokeCallback
  File "monodrag.dart", line 574, in DragGestureRecognizer._checkEnd
  File "monodrag.dart", line 452, in DragGestureRecognizer.didStopTrackingLastPointer
  File "recognizer.dart", line 465, in OneSequenceGestureRecognizer.stopTrackingPointer
  File "monodrag.dart", line 461, in DragGestureRecognizer._giveUpPointer
  File "monodrag.dart", line 420, in DragGestureRecognizer.handleEvent
  File "pointer_router.dart", line 98, in PointerRouter._dispatch
  File "pointer_router.dart", line 143, in PointerRouter._dispatchEventToRoutes.<fn>
  File "compact_hash.dart", line 625, in _LinkedHashMapMixin.forEach
  File "pointer_router.dart", line 141, in PointerRouter._dispatchEventToRoutes
  File "pointer_router.dart", line 127, in PointerRouter.route
  File "binding.dart", line 488, in GestureBinding.handleEvent
  File "binding.dart", line 468, in GestureBinding.dispatchEvent
  File "binding.dart", line 333, in RendererBinding.dispatchEvent
  File "binding.dart", line 413, in GestureBinding._handlePointerEventImmediately
  File "binding.dart", line 376, in GestureBinding.handlePointerEvent
  File "binding.dart", line 323, in GestureBinding._flushPointerEventQueue
  File "binding.dart", line 292, in GestureBinding._handlePointerDataPacket
  File "zone.dart", line 1415, in _rootRunUnary
  File "zone.dart", line 1308, in _CustomZone.runUnary
  File "zone.dart", line 1217, in _CustomZone.runUnaryGuarded
  File "hooks.dart", line 188, in _invoke1
  File "platform_dispatcher.dart", line 424, in PlatformDispatcher._dispatchPointerDataPacket
  File "hooks.dart", line 119, in _dispatchPointerDataPacket
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.13.2, on macOS 13.2 22D49 darwin-arm64, locale en)
    • Flutter version 3.13.2 on channel stable at /Users/efzet/fvm/versions/3.13.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ff5b5b5fa6 (6 weeks ago), 2023-08-24 08:12:28 -0500
    • Engine revision b20183e040
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/efzet/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/efzet/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • 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_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

[✓] Android Studio (version 2021.3)
    • 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.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.2.4)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 71.2.2
    • Dart plugin version 212.5744

[✓] VS Code (version 1.82.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.74.0

[✓] Connected device (3 available)
    • Pixel 6a (mobile) • 28271JEGR04021 • android-arm64  • Android 13 (API 33)
    • macOS (desktop)   • macos          • darwin-arm64   • macOS 13.2 22D49 darwin-arm64
    • Chrome (web)      • chrome         • web-javascript • Brave Browser 117.1.58.135

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>