I requested image from api, some times users haven't employee images. How to set bydefault image If request image null?
try {
return Image.network(
"$_url/nativeapi/v1.0/s3object/GetEmployeeImage?siteId=${widget
.siteId}&employeeId=${widget.employeeId}",
width: 100.0,
height: 100.0,
);
}
on SocketException catch(e){
return Image.asset(
"assets/images/logo.png",
width: 100.0,
height: 100.0,
);
}