title: Flutter: Do not expand row
body: <p>This is my source code:</p>
  <pre><code>Scaffold(
    body: Center(
      child: Container(
        color: Colors.green,
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            Flexible(
                fit: FlexFit.loose, child: Image.asset('images/demo.png')),
            Row(
              mainAxisSize: MainAxisSize.min,
              children: [
                Expanded(
                  child: Container(
                    color: Colors.yellow,
                    child: Text('Cancel'),
                  ),
                ),
                Expanded(
                  child: Container(
                    color: Colors.red,
                    child: Text('Okay'),
                  ),
                ),
              ],
            ),
          ],
        ),
      ),
    ),
  );
  </code></pre>
  <p>This is the result:</p>
  <p><a href="https://i.stack.imgur.com/vt48V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vt48V.png" alt="current status" /></a></p>
  <p>I want it to be like this:</p>
  <p><a href="https://i.stack.imgur.com/vil4S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vil4S.png" alt="what I want to achieve" /></a></p>
  <p>without using fixed sizes because the image dimensions may vary.</p>
  <p>I already tried to use flexible on the row children. The problem with that solution is that the green container is being expanded like this:</p>
  <p><a href="https://i.stack.imgur.com/epaFX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/epaFX.png" alt="what I do not want" /></a></p>
  <p>which I don't want to happen.</p>