Skip to content

Commit

Permalink
[shared_preferences] Fix confusing language in README (#8049)
Browse files Browse the repository at this point in the history
One use of "class" instead of "plugin" to refer to the `SharedPreferences` class specifically slipped through review. This updates it to make it clear that it's talking about a specific class, not the plugin.

Also updates the `setPrefix:` doc comment to clarify that it only applies to that class, now that the addition of other classes to the API surface has made that ambiguous.

Fixes flutter/flutter#158404
  • Loading branch information
stuartmorgan authored Nov 9, 2024
1 parent 2eedd7d commit a9b7140
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/shared_preferences/shared_preferences/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.3.3

* Clarifies scope of prefix handling in README.

## 2.3.2

* Removes outdated testing information from README.
Expand Down
2 changes: 1 addition & 1 deletion packages/shared_preferences/shared_preferences/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ A tool to make this process easier can be tracked here: https://github.com/flutt

#### Adding, Removing, or changing prefixes on SharedPreferences

By default, the `SharedPreferences` plugin will only read (and write) preferences
By default, the `SharedPreferences` class will only read (and write) preferences
that begin with the prefix `flutter.`. This is all handled internally by the plugin
and does not require manually adding this prefix.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class SharedPreferences {
static SharedPreferencesStorePlatform get _store =>
SharedPreferencesStorePlatform.instance;

/// Sets the prefix that is attached to all keys for all shared preferences.
/// Sets the prefix that is attached to all keys for all shared preferences
/// read or written via this class.
///
/// This changes the inputs when adding data to preferences as well as
/// setting the filter that determines what data will be returned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for reading and writing simple key-value pairs.
Wraps NSUserDefaults on iOS and SharedPreferences on Android.
repository: https://github.com/flutter/packages/tree/main/packages/shared_preferences/shared_preferences
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22
version: 2.3.2
version: 2.3.3

environment:
sdk: ^3.4.0
Expand Down

0 comments on commit a9b7140

Please sign in to comment.