Viewing version 2.4.3. Open the latest package page.

shared_preferences_web

2.4.3

Web platform implementation of shared_preferences

Download archive

Readme

shared_preferences_web

The web implementation of shared_preferences.

Usage

This package is endorsed, which means you can simply use shared_preferences normally. This package will be automatically included in your app when you do, so you do not need to add it to your pubspec.yaml.

However, if you import this package to use any of its APIs directly, you should add it to your pubspec.yaml as usual.

Changelog

2.4.3

  • Fixes issue where non-JSON formatted strings cause parsing errors.

2.4.2

  • Fixes getStringList returning immutable list.
  • Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.

2.4.1

  • Adds support for web: ^1.0.0.

2.4.0

  • Adds SharedPreferencesAsyncWeb API.

2.3.0

  • Updates web code to package web: ^0.5.0.
  • Updates SDK version to Dart ^3.3.0. Flutter ^3.19.0.

2.2.2

  • Updates minimum supported SDK version to Dart 3.2.

2.2.1

  • Adds pub topics to package metadata.
  • Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.

2.2.0

  • Adds clearWithParameters and getAllWithParameters methods.
  • Updates minimum supported SDK version to Flutter 3.3/Dart 2.18.

2.1.0

  • Adds getAllWithPrefix and clearWithPrefix methods.

2.0.6

  • Clarifies explanation of endorsement in README.
  • Aligns Dart and Flutter SDK constraints.

2.0.5

  • Updates links for the merge of flutter/plugins into flutter/packages.
  • Updates minimum Flutter version to 3.0.

2.0.4

  • Fixes library_private_types_in_public_api, sort_child_properties_last and use_key_in_widget_constructors lint warnings.

2.0.3

  • Fixes newly enabled analyzer options.
  • Removes dependency on meta.

2.0.2

  • Add implements to pubspec.

2.0.1

  • Updated installation instructions in README.
  • Move tests to example directory, so they run as integration_tests with flutter drive.

2.0.0

  • Migrate to null-safety.

0.1.2+8

  • Update Flutter SDK constraint.

0.1.2+7

  • Removed Android folder from shared_preferences_web.

0.1.2+6

  • Update lower bound of dart dependency to 2.1.0.

0.1.2+5

0.1.2+4

  • Make the pedantic dev_dependency explicit.

0.1.2+3

  • Bump gradle version to avoid bugs with android projects

0.1.2+2

  • Remove unused onMethodCall method.

0.1.2+1

0.1.2

  • Bump lower constraint on Flutter version.
  • Add stub podspec file.

0.1.1

  • Adds a shared_preferences_macos package.

0.1.0+1

  • Remove the deprecated author: field from pubspec.yaml
  • Require Flutter SDK 1.10.0 or greater.

0.1.0

  • Initial release.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'shared_preferences_web:2.4.3'
pubspec.yaml
name: shared_preferences_web
description: Web platform implementation of shared_preferences
repository: https://github.com/flutter/packages/tree/main/packages/shared_preferences/shared_preferences_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22
version: 2.4.3

environment:
  sdk: ^3.4.0
  flutter: ">=3.22.0"

flutter:
  plugin:
    implements: shared_preferences
    platforms:
      web:
        pluginClass: SharedPreferencesPlugin
        fileName: shared_preferences_web.dart

dependencies:
  flutter:
    sdk: flutter
  flutter_web_plugins:
    sdk: flutter
  shared_preferences_platform_interface: ^2.4.0
  web: ">=0.5.1 <2.0.0"

dev_dependencies:
  flutter_test:
    sdk: flutter

topics:
  - persistence
  - shared-preferences
  - storage

Version history

VersionPublishedArchiveSHA-256
0.1.0On demandDownload860eaf35…d41c9d
0.1.0+1On demandDownloada38375e5…cadbfe
0.1.2On demandDownload5778281c…5594ab
0.1.2+1On demandDownload5331a160…576996
0.1.2+2On demandDownloadd2e3d79b…274102
0.1.2+3On demandDownloadfc5fc1d0…37fe52
0.1.2+4On demandDownloadc7e790b9…05e8cc
0.1.2+5On demandDownload2250b7de…762e2e
0.1.2+7On demandDownload345b8f65…cd388d
0.2.0-nullsafetyOn demandDownload8026b312…55b08e
2.0.0On demandDownload09b72ec5…bb05c8
2.0.1On demandDownload07d8dbbd…ef28fb
2.0.2On demandDownloaded98e2d4…4c93f2
2.0.3On demandDownload09da0185…29bf9c
2.0.4On demandDownloada4b5bc37…929958
2.0.5On demandDownload6737b757…dcf9d7
2.0.6On demandDownload0dc2633f…f1bfb8
2.1.0On demandDownload74083203…655ca5
2.2.0On demandDownload7347b194…f6d33a
2.2.1On demandDownloadd762709c…3e3daf
2.2.2On demandDownload7b15ffb9…de5d21
2.3.0On demandDownload9aee1089…33042a
2.4.0On demandDownload3a293170…457936
2.4.1On demandDownload59dc807b…fcb6c2
2.4.2On demandDownloadd2ca4132…a4684e
2.4.3Cached · Upstream SHA-256 matchedDownloadc49bd060…600019

Dependencies

flutter { "sdk": "flutter" }

flutter_web_plugins { "sdk": "flutter" }

shared_preferences_platform_interface "^2.4.0"

web "\u003e=0.5.1 \u003c2.0.0"