shared_preferences_windows
2.4.1, released 2 years ago by flutter.dev
Windows platform implementation for shared_preferences
What it does
Provides the Windows-specific implementation of the shared_preferences plugin to store simple data in key-value pairs. It acts as an endorsed federated plugin that is automatically included when using the main shared_preferences package.
AI-written summary of version 2.4.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are developing a Flutter application for Windows that needs simple key-value storage.
- You are using the shared_preferences package and need Windows support.
Skip it when
- You are building apps that do not target Windows.
- You need complex relational queries or secure data encryption.
Strengths
- Automatically included when using the endorsed shared_preferences package.
- Native Windows implementation for persistent key-value data.
Weaknesses
- Limited to simple key-value data types.
- Not suitable for secure storage needs.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 5
Endorsed plugin, so it is automatically included when using shared_preferences without requiring manual addition to pubspec.yaml unless using its APIs directly.
import 'package:shared_preferences_windows/shared_preferences_windows.dart';
// Use SharedPreferencesWindows directly if needed, or rely on shared_preferencesAlternatives
Packages that do the same job and could replace shared_preferences_windows.
Works with
Packages commonly used together with shared_preferences_windows: ones it builds on, ones built on it, and its own family.
- fileshared_preferences_windows depends on itPluggable, mockable file system abstraction for Dart with in-memory support.
- path_provider_windowsshared_preferences_windows depends on itWindows implementation of the path_provider plugin
- path_providerSame familyProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- shared_preferences_androidSame familyAndroid backend for the shared_preferences plugin, storing key‑value data on Android devices.
- shared_preferencesBuilt on shared_preferences_windowsFlutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.