Can't add a ListView in Flutter

Just wrap the ListView with Expanded widget.

new Expanded(
child: new ListView(
          .....
          )
);

This tells the ListView to take width and height as much as it can.


You can fix the exception by specifying shrinkWrap = true for your ListView.

ListView(
  shrinkWrap: true,
  children...
)

This is stated in the exception message. The reason is stated in the exception messag as well.

In this specific case I am not particularly sure which Widget in the tree causes this, but I think that it is not relevant. I do not know what your Container about the ListView is about. I would start by wrapping it around the Column, but shrinkWrap should do the trick.