How do I use a landscapist placeholder while the image URL is unknown? #571
Replies: 1 comment
-
Okay just after asking my question I realized that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm aware that placeholders like Shimmer can be used while an image is being loaded from the network.
My question is - is there a way to use them when an image URL is not yet determined? My use case is this:
UiState
with aillustrationUrl: String?
propertynull
. Later, my ViewModel gets this information from my data layer and populates theillustrationUrl
.null
and only if it is not then I show a landscapist image. This results in a brief fraction of a second where the hero image does not exist on the screen and then it appears. This causes a glitch in the UI.I could make my own Box with a shimmer but I'm wondering if landscapist already has some tricks for this use case.
Beta Was this translation helpful? Give feedback.
All reactions