appleMain.dev.icerock.moko.resources.compose.FileResource.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resources-compose Show documentation
Show all versions of resources-compose Show documentation
Resources access for Kotlin Multiplatform development (mobile first)
/*
* Copyright 2023 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/
package dev.icerock.moko.resources.compose
import androidx.compose.runtime.Composable
import androidx.compose.runtime.State
import androidx.compose.runtime.produceState
import dev.icerock.moko.resources.FileResource
@Composable
actual fun FileResource.readTextAsState(): State {
return produceState(null, this) {
value = readText()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy