Skip to content

Commit

Permalink
[shared_preferences] fix documentation wording (#4986)
Browse files Browse the repository at this point in the history
The wording of the `SharedPreferences.containsKey` docs was off. This PR improves the documentation.

none. I can open an issue if really necessary.

n.a.
  • Loading branch information
Leptopoda committed Oct 10, 2023
1 parent bec2c95 commit f89e408
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 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.2.2

* Updates documentation for `containsKey`.

## 2.2.1

* Adds pub topics to package metadata.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class SharedPreferences {
/// String.
String? getString(String key) => _preferenceCache[key] as String?;

/// Returns true if persistent storage the contains the given [key].
/// Returns true if the persistent storage contains the given [key].
bool containsKey(String key) => _preferenceCache.containsKey(key);

/// Reads a set of string values from persistent storage, throwing an
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.2.1
version: 2.2.2

environment:
sdk: ">=2.19.0 <4.0.0"
Expand Down

0 comments on commit f89e408

Please sign in to comment.