title: Adding a button to the bottom of a listview widget in flutter
body: <p>I currently have a listview operating on the whole of my screen. I would like to have a button in the bottom of the screen, thus splitting it up so the listview doens't fill up the whole of my window.</p>
  
  <p>This is the current code building the class:</p>
  
  <pre><code>@override
  Widget build(BuildContext context) {
    return Scaffold(
    appBar: AppBar(
      title: Text('HT scoreboard'),
    ),
    body: _buildBody(context),
  );
  }
  
  Widget _buildBody(BuildContext context) {
  return StreamBuilder&lt;QuerySnapshot&gt;(
    stream: Firestore.instance.collection('Spillere').orderBy("score", descending: true).snapshots(),
    builder: (context, snapshot) {
      if (!snapshot.hasData) return LinearProgressIndicator();
  
      return _buildList(context, snapshot.data.documents);
    },
  );
  }
  
    Widget _buildList(BuildContext context, List&lt;DocumentSnapshot&gt; snapshot) {
  return ListView(
    padding: const EdgeInsets.only(top: 10.0),
    children: snapshot.map((data) =&gt; _buildListItem(context, data)).toList(),
  );
  }
  
  Widget _buildListItem(BuildContext context, DocumentSnapshot data) {
  final record = Record.fromSnapshot(data);
  
  return Padding(
    key: ValueKey(record.name),
    padding: const EdgeInsets.all(5.0),
    child: Container(
      decoration: BoxDecoration(
        border: Border.all(color: Colors.grey),
        borderRadius: BorderRadius.circular(5.0),
      ),
      child: ListTile(
        title: Text(record.name + ": " + record.score.toString()),
        trailing: new IconButton(icon: new Icon(isAdmin ? Icons.add : null, color: Colors.green),
            onPressed: (){
              if(isAdmin){
                record.reference.updateData({'score': record.score + 1});
              }
            }
        ),
      ),
    ),
  );
  </code></pre>