[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 https://github.com/flutter/flutter/issues/129983
This commit is contained in:
Tarrin Neal
2023-07-07 15:32:05 -07:00
committed by GitHub
parent 1c7835981c
commit 38f4b59536
3 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
## 2.3.1
* Fixes variable binding bug on older versions of Xcode.
## 2.3.0
* Adds `clearWithParameters` and `getAllWithParameters` methods.

View File

@ -55,7 +55,7 @@ public class SharedPreferencesPlugin: NSObject, FlutterPlugin, UserDefaultsApi {
func getAllPrefs(prefix: String, allowList: [String]?) -> [String: Any] {
var filteredPrefs: [String: Any] = [:]
var allowSet: Set<String>?;
if let allowList {
if let allowList = allowList {
allowSet = Set(allowList)
}
if let appDomain = Bundle.main.bundleIdentifier,

View File

@ -2,7 +2,7 @@ name: shared_preferences_foundation
description: iOS and macOS implementation of the shared_preferences plugin.
repository: https://github.com/flutter/packages/tree/main/packages/shared_preferences/shared_preferences_foundation
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22
version: 2.3.0
version: 2.3.1
environment:
sdk: ">=2.18.0 <4.0.0"