Skip to content

[shared_preferences] Provide API to detect/handle corrupt settings #141575

@JAicewizard

Description

@JAicewizard

Use case

Sometimes a file corrupts, it just hapens. However shared_preferences completely crashes in this case. This is on its own is not bad, however it provides the application no reasonable action to resolve the situation. The only solution is to crash, and leave the user unable to start the application.

Proposal

shared_preferences should allow for resetting the preferences, which can be used in case of corrupt settings. Optionally, backup/restore functionality would be nice, but this may be out of scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: proposalA detailed proposal for a change to Flutterp: shared_preferencesPlugin to read and write Shared Preferencespackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions