Skip to content

Commit

Permalink
feat: add containsKey
Browse files Browse the repository at this point in the history
  • Loading branch information
nepaul committed Feb 7, 2023
1 parent dd527b2 commit 95d8fdb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.0

* Features: add containsKey

## 1.1.1

* Doc: Update README.md
Expand Down
5 changes: 5 additions & 0 deletions lib/simple_shared_preferences.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,9 @@ class SimpleSharedPreferences {
Future<bool> remove(String key) async {
return await _sp!.remove(key);
}

/// Returns true if persistent storage the contains the given [key].
bool containsKey(String key) {
return _sp!.containsKey(key);
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: simple_shared_preferences
description: A simple wrapper for [SharedPreferences] that supports string, int, double, bool, List<String>, and Map<String, dynamic> types.
version: 1.1.1
version: 1.2.0
homepage: https://github.com/camus-design/simple_shared_preferences

environment:
Expand Down

0 comments on commit 95d8fdb

Please sign in to comment.