All of the values from the response are showing except for the image. One weird thing is that when I try to build it from my laptop, the images show. but when I try to build it on my PC, it doesn't.
No errors found in debug.
here is the sample of the response:
[
{
"id": 7,
"user_id": 1,
"caption": "Ambot ya",
"image": "storage\/images\/posts\/image\/20190927UTC163833894.jpeg",
"type": "image",
"created_at": "2019-09-27 16:38:33",
"updated_at": "2019-09-27 16:38:33",
"deleted_at": null,
"likes_count": 1,
"isLiked": 0,
"comments": [],
"likes": [
here is how I get the response;
Future<List<Feed>> getFeedAll() async {
var res = await http.get(
Uri.encodeFull(APIServices.HTTP_DOMAIN + APIServices.POST_GET_ALL),
headers: {"Authorization": "Bearer " + Constants.token});
print(res.body);
if (res.statusCode == 200) {
var data = json.decode(res.body);
print(data);
feedList = data.map<Feed>((json) => Feed.fromJson(json)).toList();
print(feedList);
}
print("List Size: ${feedList.length}");
return feedList;
}
and here is how I display it:
Image.network("${APIServices.HTTP_DOMAIN}${feed[index].image}",
fit: BoxFit.cover,
)
EDIT: I'm using an actual device to test. SAMSUNG J7 PRO