[Swift UI] AsyncImage
Load and display images from the Internet
AsyncImage(url: URL(string: imageURL)){ phase in
// SUCCESS: The image successfully loaded.
// FAILUREL The image fail to load with an error.
// EMPTY: No image is loaded.
if let image = phase.image {
image.imageModifier()
}else if phase.error != nil {
Image(systemName: "ant.circle.fill").iconModifier()
}else{
Image(systemName: "photo.circle.fill").iconModifier()
}
}
.padding(40)