Like in title said I need to update picture when got same URL, this URL whenever is called returns random picture.
Got code that is working when URL is diferent:
var model by remember { mutableStateOf(URL) }
AsyncImage(
model = model,
contentDescription = "",
modifier = Modifier.clickable(onClick = {
model = newUrl
})
)
But I what I need is to call same URL that returns random picture:
var model by remember { mutableStateOf(URL) }
AsyncImage(
model = model,
contentDescription = "",
modifier = Modifier.clickable(onClick = {
model = URL //this is what I need
})
)
You can check this example:
URL = https://cataas.com/cat you will see random cat every time you refresh page.