title: How to constrain ListView in Flutter based on viewport height
body: <p>I'm trying to limit a ListView based on viewport height so that it scrolls if more items exist in it, but I haven't found a way to successfully do that without providing a fixed number on a SizedBox.</p>
  
  <p>Layout looks like this:</p>
  
  <pre><code>- SingleChildScrollView
         - SizedBox (height equal to MediaQuery.of(context).size.height)
                 - Column
                     - Text
                       - TextField
                           - SizedBox (because I found no other way)
                                - ListView
  </code></pre>
  
  <p>Something to note here is that I don't want the List to scroll along the the rest of the view but on its own leaving textfield always in view.</p>
  
  <p><a href="https://i.stack.imgur.com/b6pW5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b6pW5.jpg" alt="enter image description here"></a></p>