shared_preferences 2.0.0-nullsafety copy "shared_preferences: ^2.0.0-nullsafety" to clipboard
shared_preferences: ^2.0.0-nullsafety copied to clipboard

outdated

Flutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add shared_preferences

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  shared_preferences: ^2.0.0-nullsafety

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:shared_preferences/shared_preferences.dart';
9.85k
likes
0
points
3.06M
downloads

Publisher

verified publisherflutter.dev

Weekly Downloads

Flutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, meta, shared_preferences_linux, shared_preferences_macos, shared_preferences_platform_interface, shared_preferences_web, shared_preferences_windows

More

Packages that depend on shared_preferences