Skip to content

Migrate from deprecated SharedPreferences to SharedPreferencesAsync #1276

Closed

Description

@Vinzent03

A mixture of using the outdated SharedPreferences (like currently in this package) and SharedPreferencesAsync in the users code causes issues. For example, any call to SharedPreferencesAsync will overwrite values of SharedPreferences even for other keys. This causes the access and refresh token to be outdated/wrong.
A solution is to migrate to the new SharedPreferencesAsync. This requires the user to migrate to the new classes as well, but that's planned by the shared_preferences plugin anyway. This would require explicit documentation in the migration notes for existing users, but also for new users starting with v3.

There is already an open pr for this: #1164

Links:

https://pub.dev/packages/shared_preferences#migration-and-prefixes

Activity

  1. github-actions commented on May 31, 2026

    @github-actions
    Contributor

    This issue has been inactive for 180 days.
    It will be automatically closed in 30 days if there is no further activity.

    If you believe this issue is still relevant, please leave a comment to keep it open.
    Thank you for your contributions!

  2. added
    planned
    and removed on Jun 5, 2026
  3. self-assigned this
    on Aug 10, 2026
  4. added a commit that references this issue on Aug 12, 2026
    41500b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

plannedv3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions