File tree Expand file tree Collapse file tree
packages/shared_preferences/shared_preferences Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 0.5.11
2+
3+ * Support Windows by default.
4+
15## 0.5.10
26
37* Update package: e2e -> package: integration_test
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import 'package:meta/meta.dart';
1111import 'package:shared_preferences_linux/shared_preferences_linux.dart' ;
1212import 'package:shared_preferences_platform_interface/shared_preferences_platform_interface.dart' ;
1313import 'package:shared_preferences_platform_interface/method_channel_shared_preferences.dart' ;
14+ import 'package:shared_preferences_windows/shared_preferences_windows.dart' ;
1415
1516/// Wraps NSUserDefaults (on iOS) and SharedPreferences (on Android), providing
1617/// a persistent store for simple data.
@@ -31,10 +32,13 @@ class SharedPreferences {
3132 // Only do the initial registration if it hasn't already been overridden
3233 // with a non-default instance.
3334 if (! kIsWeb &&
34- Platform .isLinux &&
3535 SharedPreferencesStorePlatform .instance
3636 is MethodChannelSharedPreferencesStore ) {
37- SharedPreferencesStorePlatform .instance = SharedPreferencesLinux ();
37+ if (Platform .isLinux) {
38+ SharedPreferencesStorePlatform .instance = SharedPreferencesLinux ();
39+ } else if (Platform .isWindows) {
40+ SharedPreferencesStorePlatform .instance = SharedPreferencesWindows ();
41+ }
3842 }
3943 _manualDartRegistrationNeeded = false ;
4044 }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/shared_prefere
55# 0.5.y+z is compatible with 1.0.0, if you land a breaking change bump
66# the version to 2.0.0.
77# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
8- version : 0.5.10
8+ version : 0.5.11
99
1010flutter :
1111 plugin :
@@ -35,6 +35,7 @@ dependencies:
3535 shared_preferences_linux : ^0.0.2
3636 shared_preferences_macos : ^0.0.1
3737 shared_preferences_web : ^0.1.2
38+ shared_preferences_windows : ^0.0.1
3839
3940dev_dependencies :
4041 flutter_test :
You can’t perform that action at this time.
0 commit comments