title: Flutter: SingleChildScrollView shrink-wrap its children along the vertical axis error
body: <p>In Scaffold I have a container to set background . in container's child I have <code>SingleChildScrollView</code> and in its child, I have <code>Column</code>. In children of this widget I have 2 <code>Expanded</code> widget :</p>
  
  <pre><code>Scaffold
      |
       Container
          |
           SingleChildScrollView
              |
               * Expanded
               * Expanded
  </code></pre>
  
  <p>This is code:</p>
  
  <pre><code> Widget build(BuildContext context) {
      return Scaffold(
        extendBodyBehindAppBar: true,
        resizeToAvoidBottomPadding: true,
        body: Container(
            decoration: BoxDecoration(
              image: DecorationImage(
                image: AssetImage("images/main_background.png"),
                fit: BoxFit.cover,
              ),
            ),
            child: SingleChildScrollView(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.start,
                children: &lt;Widget&gt;[
                  Expanded(..)
                  Expanded(..)
  </code></pre>
  
  <p>My problem is when on this page runs all the page has pink color means I got this error :</p>
  
  <pre><code>I/flutter ( 8893): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
  I/flutter ( 8893): The following assertion was thrown during performLayout():
  I/flutter ( 8893): RenderFlex children have non-zero flex but incoming height constraints are unbounded.
  I/flutter ( 8893): When a column is in a parent that does not provide a finite height constraint, for example if it is
  I/flutter ( 8893): in a vertical scrollable, it will try to shrink-wrap its children along the vertical axis. Setting a
  I/flutter ( 8893): flex on a child (e.g. using Expanded) indicates that the child is to expand to fill the remaining
  I/flutter ( 8893): space in the vertical direction.
  I/flutter ( 8893): These two directives are mutually exclusive. If a parent is to shrink-wrap its child, the child
  I/flutter ( 8893): cannot simultaneously expand to fit its parent.
  I/flutter ( 8893): Consider setting mainAxisSize to MainAxisSize.min and using FlexFit.loose fits for the flexible
  I/flutter ( 8893): children (using Flexible rather than Expanded). This will allow the flexible children to size
  I/flutter ( 8893): themselves to less than the infinite remaining space they would otherwise be forced to take, and
  I/flutter ( 8893): then will cause the RenderFlex to shrink-wrap the children rather than expanding to fit the maximum
  I/flutter ( 8893): constraints provided by the parent.
  I/flutter ( 8893): If this message did not help you determine the problem, consider using debugDumpRenderTree():
  I/flutter ( 8893):   https://flutter.dev/debugging/#rendering-layer
  I/flutter ( 8893):   http://api.flutter.dev/flutter/rendering/debugDumpRenderTree.html
  I/flutter ( 8893): The affected RenderFlex is:
  I/flutter ( 8893):   RenderFlex#4b35c relayoutBoundary=up13 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE(creator: Column ← _SingleChildViewport ← IgnorePointer-[GlobalKey#fcff2] ← Semantics ← _PointerListener ← Listener ← _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey&lt;RawGestureDetectorState&gt;#e245d] ← _PointerListener ← Listener ← _ScrollableScope ← _ScrollSemantics-[GlobalKey#471e6] ← ⋯, parentData: &lt;none&gt; (can use size), constraints: BoxConstraints(0.0&lt;=w&lt;=320.0, 0.0&lt;=h&lt;=Infinity), size: MISSING, direction: vertical, mainAxisAlignment: start, mainAxisSize: max, crossAxisAlignment: center, verticalDirection: down)
  I/flutter ( 8893): The creator information is set to:
  I/flutter ( 8893):   Column ← _SingleChildViewport ← IgnorePointer-[GlobalKey#fcff2] ← Semantics ← .....
  </code></pre>
  
  <p>What is the problem?</p>