Skip to content

shared_preferences package doesn't persist data on Linux #6

@needlesslygrim

Description

@needlesslygrim

shared_preferences doesn't seem to be persisting the download directory setting on Linux. The package page on pub.dev suggests it shouldn't be used for storing critical data, so I guess it's not meant to be very reliable? Also, a minor issue is that using it means that settings would be stored in the wrong place on Linux, XDG_DATA_HOME instead of XDG_CONFIG_HOME as the 'XDG Base Directory Specification' dictates (https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html).

Since PPM only seems to support desktop platforms at the moment ( although I could be wrong about this ), I could write a wrapper which uses the correct directory, based on the Rust directories crate, which I've already written a Kotlin version of. If PPM does support mobile, then I would probably suggest just manually storing stuff in the write place on Linux, and using shared_preferences ( or some alternative ) on other platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions