Vertical viewport was given unbounded height

后端 未结 10 1222
不思量自难忘°
不思量自难忘° 2020-11-30 22:30

This is my code:

  @override
  Widget build(BuildContext context) {
    return new Material(
      color: Colors.deepPurpleAccent,
      child: new Column(
           


        
10条回答
  •  星月不相逢
    2020-11-30 22:51

    This situation typically happens when a scrollable widget is nested inside another scrollable widget.

    In my case i use GridView inside of Column and that error throws.

    GridView widget has shrinkWrap property/named parameter, to set it true my problem is fixed.

    GridView.count(
      shrinkWrap: true,
      // rest of code
    )
    

提交回复
热议问题