title: Flutter ListView inside a Columns is not working
body: <p>I am trying to add a list view inside a column but it crashes</p>
  
  <p>I have got the following Errors:</p>
  
  <blockquote>
    <p>RenderFlex children have non-zero flex but incoming height constraints
    are unbounded.</p>
    
    <p>RenderBox was not laid out: RenderFlex#e1a1e relayoutBoundary=up7
    NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
    'package:flutter/src/rendering/box.dart': Failed assertion: line 1687
    pos 12: 'hasSize'</p>
    
    <p>The method '>' was called on null. Receiver: null</p>
  </blockquote>
  
  <p>This is my Code:</p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  class CheckinAccessories extends StatefulWidget {
    @override
    _CheckinAccessoriesState createState() =&gt; _CheckinAccessoriesState();
  }
  
  class _CheckinAccessoriesState extends State&lt;CheckinAccessories&gt; {
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        backgroundColor: Color(0XFF3a6fd8),
        body: Container(
          padding: EdgeInsets.only(top: 30.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.stretch,
            children: &lt;Widget&gt;[backButton(), welcomeText(), mainContent()],
          ),
        ),
        bottomNavigationBar: Container(
          height: 60.0,
          child: FlatButton(
            onPressed: () {},
            color: Color(0XFF3a6fd8),
            textColor: Colors.white,
            child: Text('Next', style: TextStyle(fontSize: 20.0)),
          ),
        ),
      );
    }
  
    Container backButton() {
      return Container(
        margin: EdgeInsets.all(10.0),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: &lt;Widget&gt;[
            RaisedButton.icon(
                color: Color(0XFF265abf),
                onPressed: () {
                  Navigator.of(context).pop(true);
                },
                icon: Icon(
                  Icons.arrow_back,
                  color: Colors.white,
                ),
                label: Text('Back',
                    style: TextStyle(
                      color: Colors.white,
                    ))),
          ],
        ),
      );
    }
  
    Container welcomeText() {
      return Container(
          decoration: BoxDecoration(
              image: DecorationImage(
                  image: AssetImage("assets/images/bg_car.png"),
                  fit: BoxFit.contain)),
          padding: EdgeInsets.all(10.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: &lt;Widget&gt;[
              Text('Accessories',
                  style: TextStyle(
                      fontSize: 40.0,
                      color: Colors.white,
                      fontWeight: FontWeight.bold,
                      height: 1.3)),
            ],
          ));
    }
  
    Container mainContent() {
      return Container(
        padding: EdgeInsets.all(30.0),
        decoration: BoxDecoration(
          borderRadius: BorderRadius.only(
              topLeft: Radius.circular(50), topRight: Radius.circular(50)),
          color: Color(0XFFedeff1),
        ),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: &lt;Widget&gt;[
            Text(
              'Accessories List',
              style: TextStyle(
                  fontSize: 15.0,
                  fontWeight: FontWeight.bold,
                  color: Color(0XFF132758)),
            ),
            Row(
              children: &lt;Widget&gt;[
                CheckboxWidget()
              ],
            )
  
          ],
        ),
      );
    }
  }
  
  class CheckboxWidget extends StatefulWidget {
    @override
    CheckboxWidgetState createState() =&gt; new CheckboxWidgetState();
  }
  
  class CheckboxWidgetState extends State {
    Map&lt;String, bool&gt; values = {
      'Apple': false,
      'Banana': false,
      'Cherry': false,
      'Mango': false,
      'Orange': false,
    };
  
    var tmpArray = [];
  
    getCheckboxItems() {
      values.forEach((key, value) {
        if (value == true) {
          tmpArray.add(key);
        }
      });
  
      // Printing all selected items on Terminal screen.
      print(tmpArray);
      // Here you will get all your selected Checkbox items.
  
      // Clear array after use.
      tmpArray.clear();
    }
  
    @override
    Widget build(BuildContext context) {
      // return Column(
      //   children: &lt;Widget&gt;[
      //     Text('test')
      //   ],
      // );
      return Column(children: &lt;Widget&gt;[
        Text('test'),
        Expanded(
          child: ListView(
  
            children: values.keys.map((String key) {
              return new CheckboxListTile(
                title: new Text(key),
                value: values[key],
                activeColor: Colors.pink,
                checkColor: Colors.white,
                onChanged: (bool value) {
                  setState(() {
                    values[key] = value;
                  });
                },
              );
            }).toList(),
          ),
        ),
      ]);
    }
  }
  </code></pre>