# shared_preferences

> Flutter plugin for storing simple key-value settings on the device

Source: https://talira.ai/catalog/shared-preferences-8vz4enwx
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [frameworks / mobile / plugins](https://talira.ai/categories/frameworks/mobile/plugins), [libraries / local storage](https://talira.ai/categories/libraries/local-storage)
- Platforms: android, ios, linux, macos, web, windows[^1]
- Licence: BSD-3-Clause[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source.
- Free tier: yes[^2]
- Backed by: [Google](https://talira.ai/orgs/google.md)
- Funding: public company (NASDAQ:GOOGL)[^3]

shared_preferences is the [Flutter](https://talira.ai/catalog/flutter-nhwgvsth.md) team's plugin for reading and writing simple key-value pairs (ints, doubles, bools, strings and string lists) in each platform's own preferences store: NSUserDefaults on iOS and macOS, DataStore Preferences or SharedPreferences on Android, and the equivalents on Linux, Windows and the web. Since 2.3 it has three APIs: the original SharedPreferences, SharedPreferencesAsync, which always reads the platform store, and SharedPreferencesWithCache, which allows synchronous reads after loading. Writes may reach disk asynchronously, so it isn't for critical data. It's part of the flutter/packages repository and published on pub.dev by flutter.dev.

## Links

- GitHub: https://github.com/flutter/packages
- Docs: https://pub.dev/packages/shared_preferences

## Problems it solves

- save a user's settings like dark mode on the device in a Flutter app
- remember small values between launches of my Flutter app on Android and iOS
- store simple key-value data in a Flutter web or desktop app

## Features

- Stores simple key-value settings on the device from Flutter
- Uses each platform's preferences store (NSUserDefaults, DataStore, and others)
- Android, iOS, Linux, macOS, web and Windows
- Async and cached APIs

## Limitations

- Writes may be persisted to disk asynchronously with no guarantee, so it must not be used for critical data[^1]

## Trust

Overall: 0.73 out of 1.
Signals: maintenance 1.00, adoption 0.75, momentum 0.51, community 1.00, backing 0.55, extensibility 0.00.

- last commit 4 days ago
- 620 commits in the last 90 days
- latest release pigeon-v29.0.4 2 months ago
- 5.3k GitHub stars
- 1952 contributors
- backed by Google
- funding: public company (NASDAQ:GOOGL)

## Related

- Works with [Flutter](https://talira.ai/catalog/flutter-nhwgvsth.md)

## Alternatives

- [Flutter Packages](https://talira.ai/catalog/flutter-packages-jfkhbbq0.md): Flutter's first-party packages and plugins, maintained by the Flutter team
- [flutter_secure_storage](https://talira.ai/catalog/flutter-secure-storage-1y8nysbm.md): Flutter plugin that stores secrets in each platform's secure storage
- [path_provider](https://talira.ai/catalog/path-provider-k60r6596.md): Flutter plugin for finding commonly used locations on the device's file system
- [Location (Flutter)](https://talira.ai/catalog/location-flutter-ccckwx2z.md): Real-time device location for Flutter on every platform

## Sources

[^1]: https://github.com/flutter/packages/blob/main/packages/shared_preferences/shared_preferences/README.md (checked 26 Nov 2026)
[^2]: https://github.com/flutter/packages/blob/main/packages/shared_preferences/shared_preferences/LICENSE (checked 26 Nov 2026)
[^3]: https://www.sec.gov/files/company_tickers_exchange.json (checked 20 Nov 2026)
