Repository: flutter
Issue: Long SelectableText is not actually selectable in ListView
Labels: a: text input,framework,f: material design,f: scrolling,has reproducible steps,P2,found in release: 3.3,found in release: 3.4,team-design,triaged-design

First of all, I want to say thanks for your great framework, Flutter is awesome! I really enjoy using it. However there is one thing that needs to be fixed.

Steps to Reproduce:

1. Create a ListView or ListView.builder with a lot of items and long text at the bottom
2. Scroll it down and try to select all the text in the bottom, starting with beginning

**Expected results:** <!-- what did you want to see? -->
Text is being selected correctly and you can drag the handle to select it all.

**Actual results:** <!-- what did you see? -->
List starts to scroll. Sometimes selection is being cleared and you have to select it again, sometimes selection handles doesnt work. Users leave 1 star reviews because of that:(

<details>
<summary>Code sample</summary>


```
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const TestPage(),
    );
  }
}

class TestPage extends StatelessWidget {
  const TestPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    const text = """
  START THE SELECTION HERE
  This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
  This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
  This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
   This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
  This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
  This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
 This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
  This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
  This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
 This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
  This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
  This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
   This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
  This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
  This widget is the home page of your application. It is stateful, meaning
  that it has a State object (defined below) that contains fields that affect
  how it looks.
  This class is the configuration for the state. It holds the values (in this
  case the title) provided by the parent (in this case the App widget) and
  used by the build method of the State. Fields in a Widget subclass are
  always marked final.
  END THE SELECTION HERE
  """;

    const itemCount = 500;

    return Scaffold(
      body: Scrollbar(
        child: ListView.builder(
          itemCount: itemCount,
          itemBuilder: (context, index) {
            if (index < itemCount - 1) {
              return const Text("Example\n simple\n text");
            }
            return const SelectableText(text);
          },
        ),
      ),
    );
  }
}

```

</details>

<details>
  <summary>Logs</summary>

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
Analyzing selectable_text...
No issues found! (ran in 1.3s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```

[✓] Flutter (Channel stable, 3.0.5, on macOS 12.3 21E230 darwin-arm, locale en-RU)
    • Flutter version 3.0.5 at /Users/me/Work/bin/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (7 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/me/Library/Android/sdk
    • Platform android-33, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment Homebrew (build 18.0.2+0)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Android Studio (version 4.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 Homebrew (build 18.0.2+0)

[✓] VS Code (version 1.70.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.46.0

[✓] Connected device (3 available)
    • 13 (mobile)             • 00008110-001838C23C82801E            • ios          • iOS 15.4 19E241
    • iPhone 13 mini (mobile) • 66E8BECB-AF2F-438E-A1B6-25A50EE7B61E • ios          •
      com.apple.CoreSimulator.SimRuntime.iOS-15-4 (simulator)
    • macOS (desktop)         • macos                                • darwin-arm64 • macOS 12.3 21E230
      darwin-arm

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->