All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.seiko.imageloader.option.AsyncSizeResolver.kt Maven / Gradle / Ivy

package com.seiko.imageloader.option

import androidx.compose.ui.geometry.Size
import kotlinx.coroutines.CompletableDeferred

class AsyncSizeResolver : SizeResolver {

    private val sizeObserver = CompletableDeferred()

    override suspend fun size(): Size {
        return sizeObserver.await()
    }

    fun setSize(size: Size) {
        sizeObserver.complete(size)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy