Repository: flutter
Issue: TextField in NestedScrollView scrolls editing line out view port
Labels: a: text input,framework,f: material design,f: scrolling,has reproducible steps,P2,found in release: 3.3,found in release: 3.6,team-design,triaged-design

On Android I can only edit the first lines of a TextField that is embedded inside a NestedScrollView. Lines further down are scrolled out of sight when I try to edit them.
* Not tested on iOS or web.
* Tested on Android emulator and real hardware.

## Steps to Reproduce

<!-- You must include full steps to reproduce so that we can reproduce the problem. -->

1. Run `flutter create bug`.
2. Update the files as follows: 
main.dart:
```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'NestedScrollView & TextField',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(
          text:
              '1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  final String text;

  MyHomePage({Key key, this.text}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  TextEditingController _textEditingController;

  @override
  void initState() {
    _textEditingController = TextEditingController(text: widget.text);
    super.initState();
  }

  @override
  void dispose() {
    _textEditingController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: NestedScrollView(
        headerSliverBuilder: (context, isInnerBoxScrolled) => [
          SliverToBoxAdapter(
            child: Container(
              height: 500,
              color: Colors.green,
            ),
          )
        ],
        body: Builder(
          builder: (context) {
            final scrollController = PrimaryScrollController.of(context);
            return TextField(
              controller: _textEditingController,
              scrollController: scrollController,
              maxLines: 2000,
              keyboardType: TextInputType.multiline,
              textInputAction: TextInputAction.newline,
              decoration: InputDecoration(hintText: 'Your message goes here'),
            );
          },
        ),
      ),
    );
  }
}
```
3. Run the app and tap into the TextField at the bottom to edit the lines.

**Expected results:** <!-- what did you want to see? -->
I should be able to edit all lines normally, also lines that are 'below the fold'.

**Actual results:** <!-- what did you see? -->
When editing a line that is below the screen's height, the current line is scrolled out of the viewport. 
Depending on the screensize of the device, the affected line might differ. On the Pixel 2 emulator the first problematic line is 20.


<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->

```

```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
flutter analyze
Analyzing nestedtextfield...
No issues found! (ran in 3.4s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
flutter doctor -v
[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Version 10.0.19042.630], locale de-DE)
    • Flutter version 1.22.4 at C:\Users\User\flutter
    • Framework revision 1aafb3a8b9 (7 days ago), 2020-11-13 09:59:28 -0800
    • Engine revision 2c956a31c0
    • Dart version 2.10.4


[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\User\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 50.0.1
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.51.1)
    • VS Code at C:\Users\User\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.16.0

[√] Connected device (2 available)
    • A80Pro (mobile)         • A80DK017EEA0070119 • android-arm64 • Android 9 (API 28)
    • sdk gphone x86 (mobile) • emulator-5554      • android-x86   • Android 11 (API 30) (emulator)

• No issues found!
```

</details>