title: Horizontal ListView flutter WITHOUT explicit height
body: <p>I'm trying to create a Horizontal scrolling <code>listview.builder()</code> with no pre-set height.</p>
  <p>I've tried setting <code>shrinkwrap</code> to true and wrapping it inside an Expanded/Flexible.</p>
  <p>The only way (that i have found) to currently achieve the desired effect is to wrap a row inside a <code>singlechildscrollview</code> inside a column, as per this answer (<a href="https://stackoverflow.com/questions/50155738/flutter-minimum-height-on-horizontal-list-view">Flutter: Minimum height on horizontal list view</a>).</p>
  <p>The problem with that method is that there is no builder method to load dynamic data into the Cards inside the <code>singlechildscrollview</code>.</p>
  <p>My question is how do i create a Horizontal <code>listview</code> that that generates the output by the <code>row</code> nested inside the <code>singlechildscrollview</code> (<a href="https://stackoverflow.com/questions/50155738/flutter-minimum-height-on-horizontal-list-view">Flutter: Minimum height on horizontal list view</a>) but with a builder method?</p>
  <p><strong>With Flexible</strong></p>
  <pre><code>Scaffold(
    body: Container(
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: &lt;Widget&gt;[
          Flexible(
            child: ListView.builder(
              scrollDirection: Axis.horizontal,
              itemCount: 3,
              itemBuilder: (BuildContext context, int index) {
                return FeaturedCard();
              },
            ),
          ),
          Flexible(
            child: ListView.builder(
              shrinkWrap: true,
              itemCount: 10,
              itemBuilder: (BuildContext context, int index) {
                return FeaturedCard();
              },
            ),
          ),
        ],
      ),
    ),
  )
  </code></pre>
  <p><strong>Result</strong>: <a href="https://i.stack.imgur.com/XKiWo.jpg" rel="noreferrer">https://i.stack.imgur.com/XKiWo.jpg</a></p>
  <p><strong>With nested <code>row</code> inside <code>singlechildscrollview</code></strong> (The method that works)</p>
  <pre><code> Container(
    padding: EdgeInsets.only(top: 16, bottom: 8),
    child: Column(
      mainAxisSize: MainAxisSize.min,
      children: &lt;Widget&gt;[
        SingleChildScrollView(
          scrollDirection: Axis.horizontal,
          child: Row(
            children: &lt;Widget&gt;[
              FeaturedCard(),
              FeaturedCard(),
            ],
          ),
        ),
      ],
    ),
  )
  </code></pre>
  <p><strong>Result:</strong> <a href="https://i.stack.imgur.com/va3TY.jpg" rel="noreferrer">https://i.stack.imgur.com/va3TY.jpg</a></p>
  <p>Notice the added space inside the card when using flexible (this actually renders worse on different devices)</p>