in my app i have ListTile where i show my images but how can i change my images url if i have 404 error, on default image, cuz if i get 404 i have white screen in image, i trying this:
String imageURL = 'someURL';
String imageUrlDef = 'defaulURL';
String url = imageUrlDef;
Future checkImg() async{
var response = await http.get(imageURL);
if(response.statusCode == 200){
url = imageURL;
}
}