[shared_preferences] fix documentation wording (#4986)

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.
This commit is contained in:
Nikolas Rimikis
2023-10-10 21:54:57 +02:00
committed by GitHub
parent bec2c95158
commit f89e408802
3 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
## 2.2.2
* Updates documentation for `containsKey`.
## 2.2.1
* Adds pub topics to package metadata.

View File

@ -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

View File

@ -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"