8000 [shared_preferences] Endorse Windows by stuartmorgan-g · Pull Request #3059 · flutter/plugins · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[shared_preferences] Endorse Windows #3059

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/shared_preferences/shared_preferences/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.11

* Support Windows by default.

## 0.5.10

* Update package:e2e -> package:integration_test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:meta/meta.dart';
import 'package:shared_preferences_linux/shared_preferences_linux.dart';
import 'package:shared_preferences_platform_interface/shared_preferences_platform_interface.dart';
import 'package:shared_preferences_platform_interface/method_channel_shared_preferences.dart';
import 'package:shared_preferences_windows/shared_preferences_windows.dart';

/// Wraps NSUserDefaults (on iOS) and SharedPreferences (on Android), providing
/// a persistent store for simple data.
Expand All @@ -31,10 +32,13 @@ class SharedPreferences {
// Only do the initial registration if it hasn't already been overridden
// with a non-default instance.
if (!kIsWeb &&
Platform.isLinux &&
SharedPreferencesStorePlatform.instance
is MethodChannelSharedPreferencesStore) {
SharedPreferencesStorePlatform.instance = SharedPreferencesLinux();
if (Platform.isLinux) {
SharedPreferencesStorePlatform.instance = SharedPreferencesLinux();
} else if (Platform.isWindows) {
SharedPreferencesStorePlatform.instance = SharedPreferencesWindows();
}
}
_manualDartRegistrationNeeded = false;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/shared_preferences/shared_preferences/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/shared_prefere
# 0.5.y+z is compatible with 1.0.0, if you land a breaking change bump
# the version to 2.0.0.
# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
version: 0.5.10
version: 0.5.11

flutter:
plugin:
Expand Down Expand Up @@ -35,6 +35,7 @@ dependencies:
shared_preferences_linux: ^0.0.2
shared_preferences_macos: ^0.0.1
shared_preferences_web: ^0.1.2
shared_preferences_windows: ^0.0.1

dev_dependencies:
flutter_test:
Expand Down
0