Can't set Network Image with error "Exception caught by image resource service ..."

Viewed 486

Similar types of problems already on this site but in my case, it is different. Please, take a look at my code and the error. I can't understand the error.

Here is a part of my code which is causing the error:

....
....
GridTile(
                              child: Column(
                                mainAxisSize: MainAxisSize.min,
                                children: [
                                  Text(feedbackItems[index].name),
                                  Expanded(
                                    child: Image.network(
                                        '${feedbackItems[index].photo}'),
                                  ),
                                ],
                              ))
....
....

Here is the error:

enter image description here

3 Answers

Please try this.

 Container(  
  height:100,width:100           // you can give height and width there
  child: Image.network(
  '${feedbackItems[index].photo}', fit: BoxFit.fill,),       
 ),
BASELINK = 'http://xxxx.com/asset/images/'; //defined baselink
Container(  
  height:100,width:100           // you can give height and width there
  child: Image.network(
  BASELINK+'${feedbackItems[index].photo}', fit: BoxFit.fill,),       
 ),

use this.

flutter run -d chrome --web-renderer html
Related