title: In flutter, I want the Icon within a container to take up maximum size of the container
body: <pre><code>Widget build(BuildContext context) {
      return Container(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: &lt;Widget&gt;[
            Flexible(
              flex: 1,
              child: Container(
                color: Colors.blueAccent
              ),
            ),
            Flexible(
              flex: 4,
              child: Container(
                color: Colors.deepOrangeAccent,
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  //mainAxisSize: MainAxisSize.max,
                  crossAxisAlignment: CrossAxisAlignment.stretch,
                  children: &lt;Widget&gt;[
                    Icon(Icons.image),
                  ],
                ),
              ),
            ),
            Flexible(
              flex: 2,
              child: Container(color: Colors.blueGrey),
            ),
          ],
        ),
      );
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/4Egdg.png" rel="nofollow noreferrer">Screenshot</a></p>
  
  <p>The Icon is taking its original size only. I want it to fill the container. 
  I have tried LayoutBuilder but the BoxConstraints have infinite height warning comes.
  Please suggest any other options <strong>without using hardcoded sizes for any of the widgets.</strong></p>