title: A RenderFlex overflowed by 41 pixels on the bottom. The relevant error-causing widget was Column
body: <p>I need to create a search box with the result of searching in <code>ListView.Builder</code>, but I have a crash! I tried to solve it with get the <code>Container</code> height value <code>MediaQuery.of(context).size.height</code> but get me the same issue!</p>
  
  <blockquote>
    <p>════════ Exception caught by rendering library ═════════════════════</p>
    
    <p>The following assertion was thrown during layout: A RenderFlex overflowed by 41 pixels on the bottom.</p>
    
    <p>The relevant error-causing widget was
        Column  lib/pages/search.dart:78 The overflowing RenderFlex has an orientation of Axis.vertical. The edge of the RenderFlex that is
    overflowing has been marked in the rendering with a yellow and black
    striped pattern. This is usually caused by the contents being too big
    for the RenderFlex.</p>
    
    <p>Consider applying a flex factor (e.g. using an Expanded widget) to
    force the children of the RenderFlex to fit within the available space
    instead of being sized to their natural size. This is considered an
    error condition because it indicates that there is content that cannot
    be seen. If the content is legitimately bigger than the available
    space, consider clipping it with a ClipRect widget before putting it
    in the flex, or using a scrollable container rather than a Flex, like
    a ListView.</p>
    
    <p>The specific RenderFlex in question is: RenderFlex#1a63c
    relayoutBoundary=up1 OVERFLOWING
    ════════════════════════════════════════════════════════════</p>
  </blockquote>
  
  <p><strong>My Code:</strong></p>
  
  <pre><code>body: Column(
          children: &lt;Widget&gt;[
            Container(
                width: MediaQuery.of(context).size.width,
                margin: EdgeInsets.all(10),
                padding: EdgeInsets.only(right: 10),
                decoration: BoxDecoration(
                    color: Colors.white,
                    border: new Border.all(
                      color: Colors.grey,
                      width: 1,
                    ),
                    borderRadius: BorderRadius.all(new Radius.circular(10))),
                child: DropdownButton&lt;String&gt;(
                  value: dropdownValue,
                  icon: Icon(Icons.keyboard_arrow_down),
                  iconEnabledColor: Colors.grey,
                  iconSize: 50,
                  elevation: 16,
                  isExpanded: true,
                  style: TextStyle(color: Colors.black),
                  underline: Container(
                    height: 2,
                  ),
                  onChanged: (String newValue) {
                    setState(() {
                      dropdownValue = newValue;
                    });
                  },
                  items: &lt;String&gt;["Swift", "Dart"]
                      .map&lt;DropdownMenuItem&lt;String&gt;&gt;((String value) {
                    return DropdownMenuItem&lt;String&gt;(
                      value: value,
                      child: Text(value),
                    );
                  }).toList(),
                )),
            Container(
              margin: EdgeInsets.all(10),
              child: Column(
                children: &lt;Widget&gt;[
                    TextField(
                      obscureText: true,
                      onChanged: (value) {
                        filterSearchResults(value);
                      },
                      decoration: InputDecoration(
                          filled: true,
                          fillColor: Colors.white,
                          focusedBorder: OutlineInputBorder(
                              borderSide: const BorderSide(
                                  color: Color.fromRGBO(111, 192, 81, 1),
                                  width: 1.5),
                              borderRadius: BorderRadius.circular(10)),
                          contentPadding:
                              EdgeInsets.fromLTRB(20.0, 15.0, 20.0, 15.0),
                          hintText: "Search",
                          prefixIcon: new Icon(Icons.search, color: Colors.grey),
                          enabledBorder: OutlineInputBorder(
                            borderRadius: BorderRadius.all(Radius.circular(10)),
                            borderSide: BorderSide(width: 1, color: Colors.grey),
                          )),
                    ),
                  ListView.builder(
                    shrinkWrap: true,
                    scrollDirection: Axis.vertical,
                    itemCount: items.length,
                    itemBuilder: (context, index) {
                      return ListTile(
                        title: Text('${items[index]}'),
                      );
                    },
                  ),
                ],
              ),
            ),
          ],
        ),
  </code></pre>
  
  <p>What is the issue and how can I solve it??</p>