title: Nested Listviews - Expand both vertically and horizontally without specifying height
body: <p>This is my sample <a href="https://imgur.com/a/K7yEj8x" rel="nofollow noreferrer">screen</a>.</p>
  <p>As seen, I want to be able to scroll vertically in the red container, but also to be able to scroll horizontally through the pictures.</p>
  <p>This is my code which works:</p>
  <pre><code>class CityPlaceDetailsScreen extends StatelessWidget {
    CityPlaceModel cityPlaceModel;
  
    @override
    Widget build(BuildContext context) {
      Map&lt;String, Object&gt; arguments = ModalRoute.of(context).settings.arguments;
      this.cityPlaceModel = arguments['cityPlace'];
      Size size = MediaQuery.of(context).size;
  
      return Scaffold(
        body: Stack(
          children: [
            Hero(
              tag: cityPlaceModel.pictures[0],
              child: Container(
                height: size.height * 0.5,
                decoration: BoxDecoration(
                  image: DecorationImage(
                    image: AssetImage(cityPlaceModel.pictures[0]),
                    fit: BoxFit.cover,
                  ),
                ),
              ),
            ),
            Padding(
              padding: EdgeInsets.only(top: 300),
              child: Container(
                decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.only(
                    topLeft: Radius.circular(30),
                    topRight: Radius.circular(30),
                  ),
                ),
                child: Column(
                  children: [
                    Text(&quot;ABC&quot;),
                    Expanded(
                      child: ListView(
                        children: [
                          Column(
                            children: [
                              Container(
                                height: 1000,
                                child: Column(
                                  children: [
                                    Text(
                                      &quot;Photos&quot;,
                                      style: TextStyle(
                                        fontSize: 20,
                                        fontWeight: FontWeight.bold,
                                      ),
                                    ),
                                    Expanded(
                                      child: ListView(
                                        physics: BouncingScrollPhysics(),
                                        scrollDirection: Axis.horizontal,
                                        shrinkWrap: true,
                                        children:
                                            buildPhotos(cityPlaceModel.pictures),
                                      ),
                                    ),
                                    Container(
                                      color: Colors.yellow,
                                      height: 300,
                                    ),
                                  ],
                                ),
                              ),
                            ],
                          ),
                        ],
                      ),
                    ),
                  ],
                ),
              ),
            ),
          ],
        ),
      );
    }
  
    List&lt;Widget&gt; buildPhotos(List&lt;String&gt; images) {
      List&lt;Widget&gt; list = [];
      list.add(
        SizedBox(
          width: 24,
        ),
      );
      for (var i = 0; i &lt; images.length; i++) {
        list.add(buildPhoto(images[i]));
      }
      return list;
    }
  
    Widget buildPhoto(String url) {
      return Container(
        color: Colors.red,
        child: FittedBox(
          child: ClipRRect(
            borderRadius: BorderRadius.only(
              topLeft: const Radius.circular(10.0),
              topRight: const Radius.circular(10.0),
            ),
            child: Image(
              height: 500,
              width: 300,
              image: AssetImage(
                url,
              ),
            ),
          ),
          fit: BoxFit.fill,
        ),
      );
    }
  }
  
  </code></pre>
  <p>The problem is that I want to be able to do that without being forced to specify <strong>heigth:1000</strong>. The reason for that is that I will have some dynamic data within the container with variable height.</p>
  <p>If I remove the height I get:</p>
  <pre><code>RenderFlex children have non-zero flex but incoming height constraints are unbounded.
  
  
  RenderBox was not laid out: RenderFlex#ec8b2 relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  'package:flutter/src/rendering/box.dart':
  Failed assertion: line 1785 pos 12: 'hasSize'
  
  </code></pre>