Repository: flutter
Issue: ListView.builder without `itemCount` caused  infinite loop in LayoutBuilder 
Labels: framework,f: scrolling,a: quality,has reproducible steps,P2,found in release: 3.10,found in release: 3.11,team-framework,triaged-framework

Without `itemCount` ListView may run into infinite loop in LayoutBuilder
If such layout is invalid, it should throw

<details>
<summary>code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: Home(),
  ));
}

class Home extends StatelessWidget {
  const Home({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: SizedBox(
          height: 180,
          child: Column(
            children: [
              Expanded(
                child: LayoutBuilder(
                  builder: (context, constraints) {
                    final height = constraints.maxHeight / 4;
                    return ListView.builder(
                      controller: ScrollController(),
                      physics: NeverScrollableScrollPhysics(),
                      itemBuilder: (context, index) {
                        print('$index');
                        return SizedBox(
                          height: height,
                          child: Text(index.toString()),
                        );
                      },
                    );
                  },
                ),
              ),
              Container(
                height: 200.0,
                color: Colors.red,
              ),
            ],
          ),
        ),
      ),
    );
  }
}

```
</details>


<details>
<summary>flutter doctor -v</summary>

```
[✓] Flutter (Channel master, 2.1.0-13.0.pre.574, on Microsoft Windows [Version 10.0.19041.867], locale ru-RU)
    • Flutter version 2.1.0-13.0.pre.574 at c:\dev\src\flutter
    • Framework revision 02efffc134 (33 hours ago), 2021-04-10 03:49:01 -0400
    • Engine revision 8863afff16
    • Dart version 2.13.0 (build 2.13.0-222.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\danya\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.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.7)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.7.30621.155
    • Windows 10 SDK version 10.0.19041.0

[✓] 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)

[✓] IntelliJ IDEA Community Edition (version 2020.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
    • 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

[✓] VS Code (version 1.55.1)
    • VS Code at C:\Users\danya\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[✓] Connected device (4 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)       • windows       • windows-x64    • Microsoft Windows [Version 10.0.19041.867]
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 89.0.4389.114
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 89.0.774.63

• No issues found!
```
</details>