title: Flutter Listview inside column not taking full height
body: <p><a href="https://i.stack.imgur.com/33dMg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/33dMg.png" alt="enter image description here" /></a></p>
  <p>Above one is requirement. Actually requirement is that first widget (Vertical List header with below list view should take full height) means if list view has 18 items. It should show 18 items. Then below that it should show horizontal scroll.</p>
  <p>I tried in my way but due to column list view taking same height as other element due to which its not showing all item all the way. It takes half of height of screen and user need to scroll in that height itself.</p>
  <p>Need your help to sort out it. As first listview should take full height and second widget should come below that.</p>
  <p>Please see below code.</p>
  <pre><code>import 'dart:math';
  
  import 'package:flutter/material.dart';
  
  class HomePage extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text(
            &quot;Flutter test&quot;,
            style: TextStyle(color: Colors.black),
          ),
          elevation: 5,
          backgroundColor: Colors.white,
        ),
        body: Column(
          mainAxisSize: MainAxisSize.max,
          mainAxisAlignment: MainAxisAlignment.start,
          children: [
            ListHeader(&quot;Vertical List Header&quot;),
            VerticalList(),
            ListHeader(&quot;Horizontal List Header&quot;),
            HorizontalList(),
            ListHeader(&quot;Vertical List Header&quot;),
            VerticalList(),
            ScrollUp()
          ],
        ),
      );
    }
  }
  
  class ScrollUp extends StatelessWidget {
    const ScrollUp({
      Key key,
    }) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return InkWell(
        child: Container(
          alignment: Alignment.bottomCenter,
          width: double.infinity,
          height: 50,
          child: Center(
            child: Text(
              &quot;Click to scroll up&quot;,
              style: TextStyle(
                fontSize: 18,
              ),
            ),
          ),
        ),
      );
    }
  }
  
  class ListHeader extends StatelessWidget {
    final String title;
    const ListHeader(String title) : title = title;
  
    @override
    Widget build(BuildContext context) {
      return Text(
        title,
        style: TextStyle(fontSize: 18),
      );
    }
  }
  
  class HorizontalList extends StatelessWidget {
    const HorizontalList({
      Key key,
    }) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return Expanded(
        child: ListView.builder(
            shrinkWrap: true,
            scrollDirection: Axis.horizontal,
            itemCount: 30,
            itemBuilder: (BuildContext context, int index) =&gt; Container(
                  margin:
                      const EdgeInsets.symmetric(vertical: 20, horizontal: 10),
                  width: 30,
                  height: 20,
                  color: Colors.grey,
                )),
      );
    }
  }
  
  class VerticalList extends StatelessWidget {
    const VerticalList({
      Key key,
    }) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return Expanded(
        child: ListView.builder(
          shrinkWrap: true,
          itemBuilder: (ctx, int) {
            return Container(
              margin: const EdgeInsets.symmetric(vertical: 10, horizontal: 20),
              width: double.infinity,
              height: 50,
              color: Colors.primaries[Random().nextInt(Colors.primaries.length)],
            );
          },
          itemCount: 8,
        ),
      );
    }
  }
  </code></pre>