How to AsyncImage works internally? #2195
nakhmedovonline
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
AsyncImage cancels image request when onDispose? Which version is good?
}
@composable
fun CustomImage(
data: Any,
modifier: Modifier = Modifier,
) {
val context = LocalContext.current
val request = remember(context, data) {
ImageRequest.Builder(context = context)
.data(data = data)
.crossfade(true)
.build()
}
AsyncImage(
model = request,
modifier = modifier,
)
}
Beta Was this translation helpful? Give feedback.
All reactions