title: How to vertically expand container widget in flutter
body: <p>trying to expand <code>Expanded</code> or <code>Container</code> <strong>vertically</strong> to match its <strong>height</strong> with <code>Row</code> widget <strong>height</strong>, here is my code</p>
  
  <pre><code>    @override
    Widget build(BuildContext context) {
      return InkWell(
        onTap: ()=&gt; onDepartClicked(),
        child: Container(
          padding: EdgeInsets.all(16),
          child: Card(
            child: Row(
              mainAxisSize: MainAxisSize.min,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: &lt;Widget&gt;[
                Expanded(
                  flex: 8,
                  child: Padding(
                    padding: EdgeInsets.all(16),
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: &lt;Widget&gt;[
                        Text(department.name,
                          overflow: TextOverflow.visible,
                          style: TextStyle(fontSize: 20),
                        ),
                        Container(
                          margin: EdgeInsets.only(top: 8),
                          child: Row(
                            crossAxisAlignment: CrossAxisAlignment.center,
                            children: &lt;Widget&gt;[
                              Image.asset("assets/images/feedback.png", width: 20, height: 20,),
                              SizedBox(width: 4,),
                              Text(department.phone),
                              SizedBox(width: 16,),
                              Image.asset("assets/images/feedback.png", width: 20, height: 20,),
                              SizedBox(width: 4,),
                              Text(department.type),
                            ],
                          ),
                        ),
                        Container(margin: EdgeInsets.symmetric(vertical: 8),child: Divider(height: 0.3, color: Colors.grey,)),
                        Container(
                          child: Text(department.description,
                            maxLines: 3,
                            style: TextStyle(fontSize: 13),
                          ),
                        )
                      ],
                    ),
                  ),
                ),
                Container(
                  width: 40,
                  decoration: BoxDecoration(
                      color: Colors.blue,
                      borderRadius: BorderRadius.only(topRight: Radius.circular(4), bottomRight: Radius.circular(4))
                  ),
                  child: Column(
                    mainAxisSize: MainAxisSize.max,
                    children: &lt;Widget&gt;[
                      Image.asset("assets/images/feedback.png",
                        width: 20,
                        height: 20,
                        fit: BoxFit.scaleDown,
                      ),
                    ],
                  ),
                ),
              ],
            ),
          ),
        ),
      );
    }
  </code></pre>
  
  <p>I want to expand this block in the above code (second child of the <code>Row</code>):</p>
  
  <pre><code>Container(
              width: 40,
              decoration: BoxDecoration(
                  color: Colors.blue,
                  borderRadius: BorderRadius.only(topRight: Radius.circular(4), bottomRight: Radius.circular(4))
              ),
              child: Column(
                mainAxisSize: MainAxisSize.max,
                children: &lt;Widget&gt;[
                  Image.asset("assets/images/feedback.png",
                    width: 20,
                    height: 20,
                    fit: BoxFit.scaleDown,
                  ),
                ],
              ),
            ),
  </code></pre>
  
  <p>I want to achieve this view with blue area expanded vertically in parent
  <a href="https://i.stack.imgur.com/mRbaA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mRbaA.png" alt="enter image description here"></a></p>