Repository: flutter
Issue: ListView layout error when using ListView and ExpansionTile widget
Labels: framework,f: material design,f: scrolling,a: quality,has reproducible steps,P2,found in release: 2.2,workaround available,team-design,triaged-design

## Steps to Reproduce

1. Add a ListView
2. In that ListView add some ListTiles
3. Below that Tiles add some ExpansionTile
4. Now expand the the ExpansionTile widgets
5. From the last one shrink them again

**Expected results:** 
Fine rendered ListView ListTiles

**Actual results:** 
Some shift in that background color of the ListTiles

![Simulator Screen Shot - iPhone 5s - 2021-06-08 at 19 16 20](https://user-images.githubusercontent.com/54837156/121229346-1a794b00-c88e-11eb-85e9-52d880d02c2e.png)

<!--
      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.
-->

**Example app to reproduce:**
```
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.blueGrey,
      appBar: AppBar(
        centerTitle: true,
        elevation: 8.0,
        leading: Padding(
          padding: const EdgeInsets.only(left: 8.0),
        ),
        title: Text(
          widget.title,
        ),
      ),
      body: Padding(
        padding: const EdgeInsets.all(8.0),
        child: ListView(
          children: [
            const SizedBox(height: 20.0),
            Container(
                child: const Text(
              'Listview',
            )),
            const SizedBox(height: 10.0),
            ListTile(
                trailing: Icon(Icons.arrow_right),
                title: Text('Tile 1'),
                tileColor: Colors.white,
                onTap: () => {}),
            const Divider(),
            ListTile(
                trailing: Icon(Icons.arrow_right),
                title: Text('Tile 2'),
                tileColor: Colors.white,
                onTap: () => {}),
            const Divider(),
            ListTile(
                trailing: Icon(Icons.arrow_right),
                title: Text('Tile 3'),
                tileColor: Colors.white,
                onTap: () => {}),
            const Divider(),
            ListTile(
                trailing: Icon(Icons.arrow_right),
                title: const Text('Tile 4'),
                tileColor: Colors.white,
                onTap: () => {}),
            const Divider(),
            ListTile(
                trailing: Icon(Icons.arrow_right),
                title: Text('Tile 5'),
                tileColor: Colors.white,
                onTap: () => {}),
            const Divider(),
            ListTile(
                trailing: Icon(Icons.arrow_right),
                title: Text('Tile 6'),
                tileColor: Colors.white,
                onTap: () => {}),
            const SizedBox(height: 20.0),
            const Text(
              'Expansion',
            ),
            const SizedBox(height: 6.0),
            Card(
              child: const ExpansionTile(
                tilePadding: const EdgeInsets.all(8.0),
                childrenPadding: const EdgeInsets.all(8.0),
                backgroundColor: Colors.white,
                iconColor: Colors.black,
                collapsedTextColor: Colors.black,
                title: const Text('Expansion Tile No. 1'),
                textColor: Colors.black,
                children: [
                  const Text(
                      'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.')
                ],
              ),
            ),
            Card(
              child: const ExpansionTile(
                tilePadding: const EdgeInsets.all(8.0),
                childrenPadding: const EdgeInsets.all(8.0),
                backgroundColor: Colors.white,
                iconColor: Colors.black,
                collapsedTextColor: Colors.black,
                title: const Text('Expansion Tile No. 2'),
                children: [
                  const Text(
                      'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.')
                ],
              ),
            ),
            Card(
              child: const ExpansionTile(
                tilePadding: const EdgeInsets.all(8.0),
                childrenPadding: const EdgeInsets.all(8.0),
                backgroundColor: Colors.white,
                iconColor: Colors.black,
                collapsedTextColor: Colors.black,
                title: const Text('Expansion Tile No. 3'),
                children: [
                  const Text(
                      'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.')
                ],
              ),
            ),
            Card(
              child: const ExpansionTile(
                tilePadding: const EdgeInsets.all(8.0),
                childrenPadding: const EdgeInsets.all(8.0),
                backgroundColor: Colors.white,
                iconColor: Colors.black,
                collapsedTextColor: Colors.black,
                title: const Text('Expansion Tile No. 4'),
                children: [
                  const Text(
                      'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.')
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}

```



```
Analyzing hello_world...                                                
No issues found! (ran in 1.8s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.1, on macOS 11.4 20F71 darwin-x64, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.56.2)
[✓] Connected device (2 available)
```

</details>