I\'m trying to construct a simple login page for my Flutter app. I\'ve successfully built the TextFields and log in/Sign in buttons. I want to add a horizontal ListView.
You can check console output. It prints error:
The following assertion was thrown during performResize(): Horizontal viewport was given unbounded height. 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.
You need to add height constraint to your horizontal list. E.g. wrap in Container with height:
Container(
height: 44.0,
child: ListView(
scrollDirection: Axis.horizontal,
children: [
RaisedButton(
onPressed: null,
child: Text("Facebook"),
),
Padding(padding: EdgeInsets.all(5.00)),
RaisedButton(
onPressed: null,
child: Text("Google"),
)
],
),
)