Viewports expand in the cross axis to fill their container and constrain their children to match their extent in the cross axis. In this case, a horizontal viewport was given an unlimited amount of vertical space in which to expand. code example
Example: Viewports expand in the cross axis to fill their container and constrain their children to match their extent in the cross axis. In this case, a horizontal viewport was given an unlimited amount of vertical space in which to expand.
Column(
children: <Widget>[
Expanded(
child: ListView(...),
),
],
)
Column(
children: <Widget>[
SizedBox(
height: 300,
child: ListView(...),
),
],
)