I am trying Coil 3 in a Compose Multiplatform. Is ...
# squarelibraries
e
I am trying Coil 3 in a Compose Multiplatform. Is it possible to get a
PlatformContext
instance from common code?
j
Yes LocalPlatformContext 🙂
e
ah 🙂
@Joel Denke And is it possible to use
AsyncImage
without passing imageLoader each time or is it now obligatory?
I am probably using wrong dependency. Trying with regular
coil-compose
instead of
coil-compose-core
j
Yes its working. Not entirely sure what mean by passing in ImageLoader, never needed that?
e
@Joel Denke I was using wrong dependency and it was obligatory to pass image loader in each AsyncImage.
j
ImageRequest.Builder(LocalPlatformContext) {
........
}.build()
Just send this into AsyncImage or whatever variant using of Compose Coil 🙂
But yeah migrating from Coil 2 to 3 was a little tricky + the new APIs for multiplatform 😛
e
Thank you @Joel Denke!
146 Views