title: How to constrain widget with a listview to the size of their children?
body: <p>I have this SectorWidget that I meant it to be something decoupled.</p>
  
  <p>I will pass to it a list of views (of the same height) but I wouldn't like to specify the height hardcoded inside ListView nor outside. I would like it to occupy the same height of widgets, something like wrap_content in Android. But I tried a lot of ways  (like <a href="https://stackoverflow.com/questions/50857403/flutter-column-auto-height-by-parent-row">this</a> or <a href="https://stackoverflow.com/questions/42257668/the-equivalent-of-wrap-content-and-match-parent-in-flutter">this</a>) after search and cannot achieve this. Is there a way to do that in my specific case?</p>
  
  <pre><code>import 'package:flixapp/colors.dart';
  import 'package:flutter/material.dart';
  
  class SectorWidget extends StatelessWidget {
    final SectorViewModel viewModel;
  
    SectorWidget(this.viewModel);
  
    @override
    Widget build(BuildContext context) {
      return Column(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: &lt;Widget&gt;[
          Container(
            width: MediaQuery.of(context).size.width,
            child: Material(
              color: Colors.transparent,
              child: InkWell(
                splashColor: kSplashColor,
                onTap: () {},
                child: Align(
                  alignment: Alignment.centerLeft,
                  child: Padding(
                    padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
                    child: Text(
                      viewModel.title,
                      style: TextStyle(
                          fontWeight: FontWeight.w600,
                          color: Colors.black54,
                          fontSize: 30),
                    ),
                  ),
                ),
              ),
            ),
            decoration: BoxDecoration(
                color: viewModel.titleBackgroundColor ?? Colors.amber),
          ),
          Container(
            color: Colors.red,
            child: ListView.builder(
              shrinkWrap: true,
              scrollDirection: Axis.horizontal,
              itemCount: viewModel.data?.length ?? 0,
              itemBuilder: (BuildContext context, int index) {
                var data = viewModel.data;
                if (data.isNotEmpty) return viewModel.data[index];
              },
            ),
          )
        ],
      );
    }
  }
  
  class SectorViewModel {
    String title;
    Color titleBackgroundColor;
    List&lt;Widget&gt; data;
  
    SectorViewModel({this.title, this.titleBackgroundColor, this.data});
  }
  </code></pre>