observe

fun <T> observe(key: SettingsKey<T>): StateFlow<T>

Returns a StateFlow that emits the current value and subsequent changes for key.

The flow is created lazily on first call and seeded with the current stored value. Multiple callers observing the same key share the same StateFlow instance.