Alexandru Caraus
06/11/2024, 7:01 AMAlexandru Caraus
06/11/2024, 7:02 AMimplementation("io.coil-kt.coil3:coil-core-jvm:3.0.0-alpha06")
implementation("io.coil-kt.coil3:coil-svg:3.0.0-alpha06")
implementation("io.coil-kt.coil3:coil-compose:3.0.0-alpha06")
Alexandru Caraus
06/11/2024, 7:02 AMval painter = rememberAsyncImagePainter(
model = ImageRequest.Builder(PlatformContext.INSTANCE)
.data(svgPath)
.decoderDispatcher(Dispatchers.Main)
.interceptorDispatcher(Dispatchers.Main)
.fetcherDispatcher(<http://Dispatchers.IO|Dispatchers.IO>)
.dispatcher(Dispatchers.Main)
.size(Size.ORIGINAL)
.build()
)
Image(
painter = painter,
contentDescription = null,
modifier = Modifier.fillMaxSize(),
contentScale = ContentScale.Fit
)
Alexandru Caraus
06/11/2024, 7:02 AMerror: Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android' and ensure it has the same version as 'kotlinx-coroutines-core'
Alexandru Caraus
06/11/2024, 7:03 AMChrimaeon
06/11/2024, 7:11 AMkotlinx-coroutines-swing
for compose desktop applications.chrisjenx
06/11/2024, 4:26 PMchrisjenx
06/11/2024, 4:26 PMchrisjenx
06/11/2024, 4:27 PM