add SharedPreferencesKeyValueRepo

This commit is contained in:
InsanusMokrassar 2022-05-16 17:34:34 +06:00
parent 2ba5c97709
commit 7990b21cc5
2 changed files with 10 additions and 0 deletions

View File

@ -2,6 +2,10 @@
## 0.10.5
* `Repos`
* `Android`:
* New function `SharedPreferencesKeyValueRepo`
## 0.10.4
* `Versions`:

View File

@ -160,3 +160,9 @@ class KeyValueStore<T : Any> internal constructor (
}
}
}
inline fun <T : Any> SharedPreferencesKeyValueRepo(
context: Context,
name: String = "default",
cacheValues: Boolean = false
) = context.keyValueStore<T>(name, cacheValues)