title: Flutter SliverToBoxAdapter which fits child size
body: <p>I want to create a scrollable content which include:</p>
  <ol>
  <li>A header widget that includes several child widgets - which it's height is unknown</li>
  <li>A list of rows widgets</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/EneBL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EneBL.png" alt="enter image description here" /></a></p>
  <p>The correct way to do that is using a <strong>CustomScrollView</strong>, like this:</p>
  <pre><code>Widget _buildView(BuildContext context) {
  return  (
    slivers: &lt;Widget&gt;[
      SliverToBoxAdapter(
        child: Container(
          height: 128.0,
          child: _buildHeader(context),
        ),
      ),
      _buildList(context),
    ],
  );
  </code></pre>
  <p>}</p>
  <p>My problem is that my unlike this code sample, my header's height is unknown, and should fit its children's height (which can change).</p>
  <p>How do I achieve that?</p>