Skip to content

Commit a9b7140

Browse files
[shared_preferences] Fix confusing language in README (#8049)
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
1 parent 2eedd7d commit a9b7140

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

packages/shared_preferences/shared_preferences/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.3.3
2+
3+
* Clarifies scope of prefix handling in README.
4+
15
## 2.3.2
26

37
* Removes outdated testing information from README.

packages/shared_preferences/shared_preferences/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ A tool to make this process easier can be tracked here: https://github.com/flutt
160160

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

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

packages/shared_preferences/shared_preferences/lib/src/shared_preferences_legacy.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class SharedPreferences {
2828
static SharedPreferencesStorePlatform get _store =>
2929
SharedPreferencesStorePlatform.instance;
3030

31-
/// Sets the prefix that is attached to all keys for all shared preferences.
31+
/// Sets the prefix that is attached to all keys for all shared preferences
32+
/// read or written via this class.
3233
///
3334
/// This changes the inputs when adding data to preferences as well as
3435
/// setting the filter that determines what data will be returned

packages/shared_preferences/shared_preferences/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for reading and writing simple key-value pairs.
33
Wraps NSUserDefaults on iOS and SharedPreferences on Android.
44
repository: https://github.com/flutter/packages/tree/main/packages/shared_preferences/shared_preferences
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22
6-
version: 2.3.2
6+
version: 2.3.3
77

88
environment:
99
sdk: ^3.4.0

0 commit comments

Comments
 (0)