asLiveData

Convert SharedPreferencesProperty to MutableLiveData.

object ThemeSp: ISharedPreferencesOwner {
.... // Code
val theme by boolean(false).asLiveData()
}

// In Activity
val darkTheme by ThemeSp.theme.observeAsState()

Since

0.5.6