Commit 144612d 1 parent 09463cf commit 144612d Copy full SHA for 144612d
File tree 3 files changed +14
-4
lines changed
3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -140,12 +140,11 @@ class UserPreferencessNotifier extends StateNotifier<Preferences> {
140
140
if (newValue != state.amazonCountryCode) {
141
141
final SharedPreferences preferences = ref.read (preferencesProvider);
142
142
if (newValue == null ) {
143
- await preferences.remove (sharedInAppBrowser );
143
+ await preferences.remove (sharedAmazonCountryCode );
144
144
} else {
145
- await preferences.setString (sharedInAppBrowser , newValue);
145
+ await preferences.setString (sharedAmazonCountryCode , newValue);
146
146
}
147
147
state = state.copyWith (amazonCountryCode: newValue);
148
148
}
149
149
}
150
-
151
150
}
Original file line number Diff line number Diff line change
1
+ import 'package:amiibo_network/utils/preferences_constants.dart' ;
2
+ import 'package:shared_preferences/shared_preferences.dart' ;
3
+
4
+ Future <void > sharedPreferencesMigration (SharedPreferences preferences) async {
5
+ /// Fix migration error: type 'String' is not a subtype of type 'bool?'
6
+ /// in type cast. Error thrown PreferencesProvider.
7
+ final sharedInAppBrowserObject = preferences.get (sharedInAppBrowser);
8
+ if (sharedInAppBrowserObject is String ? ) {
9
+ await preferences.remove (sharedInAppBrowser);
10
+ }
11
+ }
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ description: An Amiibo collection app designed to allow you to keep track of
12
12
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
13
13
# Read more about iOS versioning at
14
14
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
15
- version : 2.2.23+94
15
+ version : 2.2.24+95
16
16
17
17
environment :
18
18
sdk : " >=3.5.0 <4.0.0"
You can’t perform that action at this time.
0 commit comments