Browse Source

[resources] Mark new API as experimental.

pull/4651/head
Konstantin Tskhovrebov 4 weeks ago
parent
commit
5d857dd203
  1. 2
      components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/PluralStringResources.kt
  2. 1
      components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringArrayResources.kt
  3. 2
      components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringResources.kt

2
components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/PluralStringResources.kt

@ -55,6 +55,7 @@ suspend fun getPluralString(resource: PluralStringResource, quantity: Int): Stri
*
* @throws IllegalArgumentException If the provided ID or the pluralization is not found in the resource file.
*/
@ExperimentalResourceApi
suspend fun getPluralString(
environment: ResourceEnvironment,
resource: PluralStringResource,
@ -129,6 +130,7 @@ suspend fun getPluralString(resource: PluralStringResource, quantity: Int, varar
*
* @throws IllegalArgumentException If the provided ID or the pluralization is not found in the resource file.
*/
@ExperimentalResourceApi
suspend fun getPluralString(
environment: ResourceEnvironment,
resource: PluralStringResource,

1
components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringArrayResources.kt

@ -57,6 +57,7 @@ suspend fun getStringArray(resource: StringArrayResource): List<String> =
*
* @throws IllegalStateException if the string array with the given ID is not found.
*/
@ExperimentalResourceApi
suspend fun getStringArray(
environment: ResourceEnvironment,
resource: StringArrayResource

2
components/resources/library/src/commonMain/kotlin/org/jetbrains/compose/resources/StringResources.kt

@ -50,6 +50,7 @@ suspend fun getString(resource: StringResource): String =
*
* @throws IllegalArgumentException If the provided ID is not found in the resource file.
*/
@ExperimentalResourceApi
suspend fun getString(environment: ResourceEnvironment, resource: StringResource): String =
loadString(resource, DefaultResourceReader, environment)
@ -108,6 +109,7 @@ suspend fun getString(resource: StringResource, vararg formatArgs: Any): String
*
* @throws IllegalArgumentException If the provided ID is not found in the resource file.
*/
@ExperimentalResourceApi
suspend fun getString(
environment: ResourceEnvironment,
resource: StringResource,

Loading…
Cancel
Save