add SharedPreferencesKeyValueRepo

This commit is contained in:
InsanusMokrassar committed 2022-05-16 17:34:34 +06:00
1 parent 2ba5c97709
commit 7990b21cc5
2 files changed
+10

No files matched your search

+4
View File
@@ -2,6 +2,10 @@
## 0.10.5
* `Repos`
* `Android`:
* New function `SharedPreferencesKeyValueRepo`
## 0.10.4
* `Versions`:
@@ -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)