Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit f4e656d

Browse files
committed
Update docs
Signed-off-by: Simon Sickle <sickle@hey.com>
1 parent d8030c0 commit f4e656d

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ Usage
1111
-----
1212

1313
When you want to use shared preferences, you can now call it in
14-
a simplified manor.
14+
a simplified manor. EncryptedSharedPreferences also works with this extension.
1515

1616
```kotlin
1717
val prefs = context.getSharedPreferences("nameOfPrefs", Context.MODE_PRIVATE)
1818

1919
...
2020

21-
// Note, you must use nullable types as SharedPreferences doesn't enforce nullability like kotlin
22-
var someField: String? by prefs.delegate()
21+
var someField: String by prefs.delegate()
2322

2423
// You can also set a default value and key name for the preferences
2524
var someOtherField: String by prefs.delegate(keyName = "SomeCoolPreference", defaultValue = "Hello")
@@ -34,9 +33,9 @@ fun doSomething(): String {
3433

3534
Supported Types
3635
---------------
37-
- String
38-
- String Set (`Set<String>`)
39-
- Int
40-
- Long
41-
- Float
42-
- Boolean
36+
- String (defaultValue is an empty string `""`)
37+
- String Set (defaultValue is an empty StringSet `emptySet<String>()`)
38+
- Int (defaultValue is -1)
39+
- Long (defaultValue is -1L)
40+
- Float (defaultValue is 0F)
41+
- Boolean (defaultValue is false)

0 commit comments

Comments
 (0)