shared_preferences_platform_interface
v2.4.2A common platform interface for the shared_preferences plugin.
Package archive: https://pubdev.letsnova.ru/api/archives/shared_preferences_platform_interface/2.4.2.tar.gz
dart pub add shared_preferences_platform_interfaceReadme
shared_preferences_platform_interface
A common platform interface for the shared_preferences plugin.
This interface allows platform-specific implementations of the shared_preferences
plugin, as well as the plugin itself, to ensure they are supporting the
same interface.
Usage
To implement a new platform-specific implementation of shared_preferences, extend
SharedPreferencesPlatform and SharedPreferencesAsyncPlatform with
implementations that perform the platform-specific behaviors, and when you register
your plugin, set the default SharedPreferencesStorePlatform and
SharedPreferencesAsyncPlatform by calling the SharedPreferencesPlatform.instance
and SharedPreferencesAsyncPlatform.instance setters.
Please note that the plugin tooling only registers the native and/or Dart classes
listed in your package's pubspec.yaml, so if you intend to implement more than
one class, you will need to manually register the second class
(as can be seen in the Android and iOS implementations).
Note on breaking changes
Strongly prefer non-breaking changes (such as adding a method to the interface) over breaking changes for this package.
See https://flutter.dev/go/platform-interface-breaking-changes for a discussion on why a less-clean interface is preferable to a breaking change.
Changelog
2.4.2
- Fixes dartdoc comments that accidentally used HTML.
- Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.
2.4.1
- Adds comments about unsupported types.
2.4.0
- Adds
SharedPreferencesAsyncPlatformAPI. - Updates minimum supported SDK version to Flutter 3.16/Dart 3.2.
2.3.2
- Updates minimum required plugin_platform_interface version to 2.1.7.
- Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
2.3.1
- Adds pub topics to package metadata.
- Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.
2.3.0
- Adds
clearWithParametersandgetAllWithParametersmethods. - Deprecates
clearWithPrefixandgetAllWithPrefixmethods. - Updates minimum supported SDK version to Flutter 3.3/Dart 2.18.
2.2.0
- Adds
getAllWithPrefixandclearWithPrefixmethod. - Aligns Dart and Flutter SDK constraints.
2.1.1
- Updates links for the merge of flutter/plugins into flutter/packages.
- Updates minimum Flutter version to 3.0.
2.1.0
- Adopts
plugin_platform_interface. As a result,isMockis deprecated in favor of the now-standardMockPlatformInterfaceMixin.
2.0.0
- Migrate to null safety.
1.0.5
- Update Flutter SDK constraint.
1.0.4
- Update lower bound of dart dependency to 2.1.0.
1.0.3
- Make the pedantic dev_dependency explicit.
1.0.2
- Adds a
shared_preferences_macospackage.
1.0.1
- Remove the deprecated
author:field from pubspec.yaml
1.0.0
- Initial release. Contains the interface and an implementation based on method channels.
