I'm trying to figure out what I'm doing wrong. Shouldn't it never fire that error since it's inside a ListView with vertical scroll?
body: Center(
child: FutureBuilder<FiveDaysForecast>(
future: forecast,
builder: (context, snapshot) {
if (snapshot.hasData) {
return ListView(scrollDirection: Axis.vertical, children: [
Container(
padding: EdgeInsets.all(30),
margin: EdgeInsets.fromLTRB(5, 20, 5, 30),
child: Column(
children: [
Image.network(
snapshot.data.getCurrentWeatherImageUrl())],
)),
Container(width: 100, height: 60, child: ListView.builder(
scrollDirection: Axis.horizontal,
itemBuilder: (context, index) {
return Container(
width: 70,
//height: 70,
//padding: EdgeInsets.all(5),
margin: EdgeInsets.fromLTRB(5, 10, 5, 10)),
child: Column(children: [
Image.network(
"${snapshot.data.getNextFiveHours()[index].getWeatherImageUrl()}"),
Text(
"${snapshot.data.getNextFiveHours()[index].dateTime.hour}:00",
style: GoogleFonts.roboto(
fontSize: 16, color: Colors.white))
]),
);
},
itemCount: 5),),
]);
}
if (_cityName == "") {
return Text("Search a city");
} else {
return CircularProgressIndicator();
}
},
)),
I'm trying to create a vertical scrollable app that contains an horizontal list view and a container.