getPropertyValue

suspend fun <T> PropertyStore.getPropertyValue(name: String): T?(source)

Retrieves a property's value directly, without the Property wrapper.

This is a convenience method that combines property lookup with value extraction. Returns null if the property doesn't exist or if the property's value is null.

Example:

// Get value directly
val timeout: Int? = store.getPropertyValue("timeout")
val region: String? = store.getPropertyValue("region")

// Use with null-safety
val retries = store.getPropertyValue<Int>("maxRetries") ?: 3

Return

the property value if found, null otherwise

Parameters

T

the expected type of the property value

name

the name of the property