the error is in space.photos.map in the map section

Issue

children:
space.photos.map((item) {
return Container(
margin: EdgeInsets.only(
left: 24,
),
child: ClipRRect(
borderRadius: BorderRadius.circular(16),
child: Image.network(
item,
width: 110,
height: 88,
fit: BoxFit.cover,
),
),
);
}).toList()

Solution

http.get() takes a Uri as its argument and not a string. Correct way: http.get(Uri.parse('https://bwa-cozy.herokuapp.com/recommended-spaces'));

Answered By – TheUltimateOptimist

Answer Checked By – Cary Denson (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.