title: How do I put a container over a generated list in the body of a page?
body: <p>I'm trying to put a container over a generated list in the body of a page however the container and the list don't show up when I embed them in a ListView.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>final dummySnapshot = [
    {"courseTitle": "Course title - Course 0", "completeness": "incomplete"},
    {"courseTitle": "Course title - Course 1", "completeness": "incomplete"},
    {"courseTitle": "Course title - Course 2", "completeness": "incomplete"},
  ];
  
  class Home extends StatelessWidget {
    const Home({Key key, this.user}) : super(key: key);
    final FirebaseUser user;
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text("Example Text A"),
        ),
        body: ListView(
          children: &lt;Widget&gt;[
            mainHeader(),
            MyList(),
          ],
        ),
      );
    }
  }
  
  Widget mainHeader() {
    return Container(
      height: 50.0,
      child: Center(
        child: Text(
          "Example Text B",
        ),
      ),
    );
  }
  
  class MyList extends StatefulWidget {
    @override
    MyListState createState() {
      return MyListState();
    }
  }
  
  class MyListState extends State&lt;MyList&gt; {
    @override
    Widget build(BuildContext context) {
      return _buildBody(context);
    }
  
    Widget _buildBody(BuildContext context) {
      return _buildList(context, dummySnapshot);
    }
  
    Widget _buildList(BuildContext context, List&lt;Map&gt; snapshot) {
      return ListView(
        padding: const EdgeInsets.only(top: 20.0),
        children: snapshot.map((data) =&gt; _buildListItem(context, data)).toList(),
      );
    }
  
    Widget _buildListItem(BuildContext context, Map data) {
      final record = Record.fromMap(data);
  
      return Padding(
        key: ValueKey(record.courseTitle),
        padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
        child: Container(
          decoration: BoxDecoration(
            border: Border.all(color: Colors.grey),
            borderRadius: BorderRadius.circular(5.0),
          ),
          child: ListTile(
            title: Text(record.courseTitle),
            trailing: Text(record.completeness),
            onTap: () =&gt; print(record),
          ),
        ),
      );
    }
  }
  
  class Record {
    final String courseTitle;
    final String completeness;
    final DocumentReference reference;
  
    Record.fromMap(Map&lt;String, dynamic&gt; map, {this.reference})
        : assert(map['courseTitle'] != null),
          assert(map['completeness'] != null),
          courseTitle = map['courseTitle'],
          completeness = map['completeness'];
  
    Record.fromSnapshot(DocumentSnapshot snapshot)
        : this.fromMap(snapshot.data, reference: snapshot.reference);
  
    @override
    String toString() =&gt; "Record&lt;$courseTitle:$completeness&gt;";
  }
  </code></pre>
  
  <p>When this code is run in my Xcode simulator the entire body doesn't show, only the app bar. However when I get rid of the body's ListView and run the mainHeader() only in the body the container shows up and when I run the MyList() only in the body the list also shows up. Is there a way to get both to show?</p>
  
  <p>Any help is greatly appreciated!</p>