-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c34624
commit 7a3233e
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
icon: material/arrow-up-box | ||
--- | ||
|
||
!!! info | ||
|
||
Version `7.*` is a kotlin multiplatform rewrite, that's why some fundamantal changes needed to be done! | ||
|
||
Overall some things have become extension functions to provide target specific implementations. Platform specific functions and overloads have been added to provide a good single platform experience and some typos have been fixed as well. | ||
|
||
Following is an overview on what has changed and shows how you can migrate your project. | ||
|
||
#### DataStoreStorage | ||
|
||
I do provide platform specific `create` function to make single platform usage easier. On android those do look like following now: | ||
|
||
```kotlin | ||
val storage = DataStoreStorage.create(name = "...") | ||
``` | ||
|
||
In MP projects you can simply use the classes themself if you want to. | ||
|
||
Additionally the class was moved from `import com.michaelflisar.kotpreferences.datastore.DataStoreStorage` to `com.michaelflisar.kotpreferences.storage.datastore.DataStoreStorage`. | ||
|
||
#### enumPref | ||
|
||
The `enumPref` function that does not need an array of all enum values became an extension function and only exists on android (because the `Enum.entries` field does not exist on all platforms). | ||
|
||
You need to import `import com.michaelflisar.kotpreferences.core.enumPref` on android now to keep using this function. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters