You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Add support for compile-safe Compose Multiplatform Resources like Res.drawable.sample. Currently we only support loading them via Res.getUri("drawable/sample.jpg").
Additional context
Previously this wasn't possible as there was missing API support, but Compose Multiplatform now has public rememberResourceEnvironment and getDrawableResourceBytes functions, which should make adding support for this possible.
It's not 100% straightforward to add this as we can't access these functions from coil-compose-core, as depending on the resource library would add it as a dependency for all users. Ideally we'd be able to reference them in coil-compose-core as that's where we have access to the composition. Instead we'll probably have to make an extension library and add hooks to pass the ResourceEnvironment through to a custom Fetcher.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Add support for compile-safe Compose Multiplatform Resources like
Res.drawable.sample
. Currently we only support loading them viaRes.getUri("drawable/sample.jpg")
.Additional context
Previously this wasn't possible as there was missing API support, but Compose Multiplatform now has public
rememberResourceEnvironment
andgetDrawableResourceBytes
functions, which should make adding support for this possible.It's not 100% straightforward to add this as we can't access these functions from
coil-compose-core
, as depending on the resource library would add it as a dependency for all users. Ideally we'd be able to reference them incoil-compose-core
as that's where we have access to the composition. Instead we'll probably have to make an extension library and add hooks to pass theResourceEnvironment
through to a customFetcher
.The text was updated successfully, but these errors were encountered: