Vertical viewport was given unbounded height

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

+++++++++++++++

可以通过指定shrinkWrap = true为了你ListView

ListView(
  shrinkWrap: true,
  children... )

异常消息中说明了这一点。原因也在异常消息中说明。

在这个具体的案例中,我不确定哪一个Widget在树中造成这一点,但我认为它是不相关的。我不知道你的Container关于ListView是关于。我会先把它包在Column,但是shrinkWrap应该能行。

猜你喜欢

转载自www.cnblogs.com/pythonClub/p/10637064.html
今日推荐