I am following an online tutorial on Loading Images using Coil Library in a Compose project.
The instructor has used this code snippet to load an image from an API:
Image(
painter = rememberImagePainter(data = trackedFood.imageUrl, builder = {
crossfade(true)
error(R.drawable.ic_burger)
fallback(R.drawable.ic_burger)
}) ....
}
While I understand the use of the crossfade, placeholder and error features, I haven't understood the need for the fallback
feature thus this question.
I have read the Coil docs but it doesn't explain what fallback feature
does and I am now seeking a clarification.