Skip to content

[shared_preferences] Allow specifying the preferences store name on Android #14337

@Rockvole

Description

@Rockvole

In Android you can store preference files by different filenames. I use this for example to store data for multiple users, or for different preference pages.
e.g. (In Android)

    SharedPreferences settings = context.getSharedPreferences("scores.xml", Context.MODE_PRIVATE);
    SharedPreferences.Editor editor = settings.edit();
    editor.putBoolean("won", true); 
    editor.putInt("score",783);
    editor.apply();

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilitycustomer: crowdAffects or could affect many people, though not necessarily a specific customer.p: shared_preferencesPlugin to read and write Shared Preferencespackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions