Skip to content

Commit

Permalink
[shared_preferences] Endorse web plugin. (flutter#2390)
Browse files Browse the repository at this point in the history
* Make shared_preferences example work on web

* [shared_preferences] Endorse web plugin

* format pubspec
  • Loading branch information
Harry Terkelsen authored Dec 11, 2019
1 parent 1e82c75 commit fc2ea9f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/shared_preferences/shared_preferences/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.5.6

* Support `web` by default.
* Require Flutter SDK 1.12.13+hotfix.4 or greater.

## 0.5.5

* Support macos by default.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>example</title>
</head>
<body>
<script src="main.dart.js" type="application/javascript"></script>
</body>
</html>
7 changes: 5 additions & 2 deletions packages/shared_preferences/shared_preferences/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: shared_preferences
description: Flutter plugin for reading and writing simple key-value pairs.
Wraps NSUserDefaults on iOS and SharedPreferences on Android.
homepage: https://github.com/flutter/plugins/tree/master/packages/shared_preferences/shared_preferences
version: 0.5.5
version: 0.5.6

flutter:
plugin:
Expand All @@ -14,6 +14,8 @@ flutter:
pluginClass: FLTSharedPreferencesPlugin
macos:
default_package: shared_preferences_macos
web:
default_package: shared_preferences_web

dependencies:
meta: ^1.0.4
Expand All @@ -26,6 +28,7 @@ dependencies:
# TODO(franciscojma): Revisit this (either update this part in the design or the pub tool).
# https://github.com/flutter/flutter/issues/46264
shared_preferences_macos: ^0.0.1
shared_preferences_web: ^0.1.2

dev_dependencies:
flutter_test:
Expand All @@ -37,4 +40,4 @@ dev_dependencies:

environment:
sdk: ">=2.0.0-dev.28.0 <3.0.0"
flutter: ">=1.12.8 <2.0.0"
flutter: ">=1.12.13+hotfix.4 <2.0.0"

0 comments on commit fc2ea9f

Please sign in to comment.