title: How do I put a ListView under a scaffold with padding?
body: <p>I am quite new to flutter and I've been trying to set up a profile page for my app but it seems like I don't quite understand how these flutter widgets come together, I apologize if my question is quite dumb but I've been googling and failing at getting this to work. So basically I have a scaffold which holds a container thats supposed to display profile info (email, name, etc.), under it I'd like to place a listview, but flutter has been boggling my mind, I can't seem to understand how layouts work together, here is my code. When I try to do buildPage(), I get an error that the scaffold has infinite size, using buildBox() alone works. I'm not sure how to go about this. Any Help is appreciated</p>
  
  <pre><code>    import 'package:flutter/material.dart';
  
      class ProfileBox extends StatefulWidget {
        final String userEmail;
        const ProfileBox(this.userEmail);
  
        @override
        _ProfileBoxState createState() =&gt; _ProfileBoxState();
      }
  
      class _ProfileBoxState extends State&lt;ProfileBox&gt; {
  
  
        @override
        Widget build(BuildContext context) {
         return _buildPage();
        }
  
  
  
        Widget _buildBox(){
       return Scaffold(
            body: Align(
              alignment: Alignment.topCenter,
              child: LayoutBuilder(
                builder: (BuildContext context, BoxConstraints constraints) {
                  return Container(
                        margin: const EdgeInsets.only(top: 20.0),
                        decoration: BoxDecoration(
                        color: Color(0xFF8185E2), border: Border.all(
                        color: Color(0xFF8185E2),
                        ),
                        borderRadius: BorderRadius.all(Radius.circular(20))
                        ),
                    height: constraints.maxHeight / 2.5,
                    width: MediaQuery.of(context).size.width -  (MediaQuery.of(context).size.width * 5)/100,
                     child: Center(
              child: Text(
               widget.userEmail,
                textAlign: TextAlign.center,
              ),
            ),
                  );
                },
              ),
            ),
          );
        }
  
  
        Widget _buildPage()
        {
          return Column(children: &lt;Widget&gt;[
            _buildBox(),
            _buildList(),
  
          ],);
  
        }
  
        Widget _buildList()
        {
           return ListView(
              children: &lt;Widget&gt;[
                ListTile(
                  title: Text('Sun'),
                ),
                ListTile(
                  title: Text('Moon'),
                ),
                ListTile(
                  title: Text('Star'),
                ),
              ],
            );
        }
  
  }
  </code></pre>