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

commonMain.epsilon.ImageViewerUploaderFactory.kt Maven / Gradle / Ivy

There is a newer version: 3.0.11
Show newest version
package epsilon

import koncurrent.Later
import koncurrent.later.then
import koncurrent.later.andThen
import koncurrent.later.andZip
import koncurrent.later.zip
import koncurrent.later.catch
import epsilon.internal.ImageViewerUploaderImpl

fun ImageViewerUploader(
    onUpload: ((RawFile) -> Later)? = null,
    url: String? = null
): ImageViewerUploader {
    val state = if (url != null) {
        ViewingImage(url)
    } else {
        AwaitingImage
    }
    return ImageViewerUploaderImpl(state, onUpload)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy