Skip to content

Commit 38f4b59

Browse files
authored
[shared_preferences] Variable binding in a condition requires an initializer fix (#4407)
Not sure that testing for this makes sense, unless we want to add old xcode versions to our test suite. Let me know if I'm thinking about this incorrectly though. fixes flutter/flutter#129983
1 parent 1c78359 commit 38f4b59

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

packages/shared_preferences/shared_preferences_foundation/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.3.1
2+
3+
* Fixes variable binding bug on older versions of Xcode.
4+
15
## 2.3.0
26

37
* Adds `clearWithParameters` and `getAllWithParameters` methods.

packages/shared_preferences/shared_preferences_foundation/darwin/Classes/SharedPreferencesPlugin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class SharedPreferencesPlugin: NSObject, FlutterPlugin, UserDefaultsApi {
5555
func getAllPrefs(prefix: String, allowList: [String]?) -> [String: Any] {
5656
var filteredPrefs: [String: Any] = [:]
5757
var allowSet: Set<String>?;
58-
if let allowList {
58+
if let allowList = allowList {
5959
allowSet = Set(allowList)
6060
}
6161
if let appDomain = Bundle.main.bundleIdentifier,

packages/shared_preferences/shared_preferences_foundation/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: shared_preferences_foundation
22
description: iOS and macOS implementation of the shared_preferences plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/shared_preferences/shared_preferences_foundation
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22
5-
version: 2.3.0
5+
version: 2.3.1
66

77
environment:
88
sdk: ">=2.18.0 <4.0.0"

0 commit comments

Comments
 (0)