When try to wrap "list view builder" with single-child-scroll-view it shows the given error.
Error : Vertical viewport was given unbounded height.
Also if I try to give a specific height of the list view wrapping with a container the single child scroll view doesn't work. It gives the same error. May be there are some faults in this code
Code :
return ListView.builder(
scrollDirection: Axis.vertical,
itemCount: dailyUpdate!.forecast!.forecastday!.length,
itemBuilder: (context, index) {
return Card(
elevation: 3,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
color: Color.fromARGB(255, 65, 65, 64),
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 10, horizontal: 5),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(
width: 50,
child: Image.network(
'https:' +
dailyUpdate!.forecast!.forecastday![index].day!
.condition!.icon
.toString(),
width: 50,
),
),
Container(
width: 85,
child: customText(
DateFormat('EEE, MMMM d').format(DateTime.parse(
dailyUpdate.forecast!.forecastday![index].date
.toString())),
color: Colors.white),
),
Container(
width: 120,
child: customText(
dailyUpdate.forecast!.forecastday![index].day!
.condition!.text
.toString(),
color: Colors.white),
),
Container(
width: 60,
child: customText(
dailyUpdate.forecast!.forecastday![index].day!
.maxtempC!
.round()
.toString() +
' / ' +
dailyUpdate.forecast!.forecastday![index].day!
.mintempC!
.round()
.toString(),
color: Colors.white),
),
],
),
),
);
});