https://stackoverflow.com/questions/50252569/vertical-viewport-was-given-unbounded-height

    This is my code:

    1. @override
    2. Widget build(BuildContext context) {
    3. return new Material(
    4. color: Colors.deepPurpleAccent,
    5. child: new Column(
    6. mainAxisAlignment: MainAxisAlignment.center,
    7. children:<Widget>[new GridView.count(crossAxisCount: _column,children: new List.generate(_row*_column, (index) {
    8. return new Center(
    9. child: new CellWidget()
    10. );
    11. }),)]
    12. )
    13. );
    14. }

    Exception as follows:

    1. I/flutter ( 9925): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
    2. I/flutter ( 9925): The following assertion was thrown during performResize():
    3. I/flutter ( 9925): Vertical viewport was given unbounded height.
    4. I/flutter ( 9925): Viewports expand in the scrolling direction to fill their container.In this case, a vertical
    5. I/flutter ( 9925): viewport was given an unlimited amount of vertical space in which to expand. This situation
    6. I/flutter ( 9925): typically happens when a scrollable widget is nested inside another scrollable widget.
    7. I/flutter ( 9925): If this widget is always nested in a scrollable widget there is no need to use a viewport because
    8. I/flutter ( 9925): there will always be enough vertical space for the children. In this case, consider using a Column
    9. I/flutter ( 9925): instead. Otherwise, consider using the "shrinkWrap" property (or a ShrinkWrappingViewport) to size
    10. I/flutter ( 9925): the height of the viewport to the sum of the heights of its children.
    11. I/flutter ( 9925):
    12. I/flutter ( 9925): When the exception was thrown, this was the stack:
    13. I/flutter ( 9925): #0 RenderViewport.performResize.<anonymous closure> (package:flutter/src/rendering/viewport.dart:827:15)
    14. I/flutter ( 9925): #1 RenderViewport.performResize (package:flutter/src/rendering/viewport.dart:880:6)
    15. I/flutter ( 9925): #2 RenderObject.layout (package:flutter/src/rendering/object.dart:1555:9)

    1. Wrap ListView in Expanded

      1. Column(
      2. children: <Widget>[
      3. Expanded( // wrap in Expanded
      4. child: ListView(...),
      5. ),
      6. ],
      7. )
    2. Wrap ListView in SizedBox and give a bounded height

      1. Column(
      2. children: <Widget>[
      3. SizedBox(
      4. height: 400, // fixed height
      5. child: ListView(...),
      6. ),
      7. ],
      8. )
    3. Use shrinkWrap: true in ListView.

      1. Column(
      2. children: <Widget>[
      3. ListView(
      4. shrinkWrap: true, // use this
      5. ),
      6. ],
      7. )