Colton Idle
04/30/2025, 4:25 AMPablichjenkov
04/30/2025, 4:39 AMKeyValueStorage or KeyValuePersistanceManager. Internally the library will have different dependencies and API wrappers on each platform sourceset.
Obviously the public API the library exposes, has to live in the library commonMain sourceset. But actual implementations internally for the library will live independently in each target inside the library, with different dependencies each, if required.Jacob Ras
04/30/2025, 7:45 AMinterface UserPreferences exposing flows and setters. The implementations in each supported platform use DataStore, so in [androidMain] it gets a Context injected through Koin, but in [desktopMain] it doesn't need that and directly passes a File into PreferenceDataStoreFactoryColton Idle
04/30/2025, 1:06 PMfun createDataStore(): DataStore<Preferences> = //TODO
Let me read this again when I'm at my computer and not on mobile. maybe it'll click then. sounds like it should be possible though so thats good.Jacob Ras
04/30/2025, 1:13 PMUserPreferences example I have zero references to DataStore, I keep that an internal implementation detail :)Colton Idle
04/30/2025, 1:15 PM