FLUTTER ECOSYSTEM

cross_local_storage

SharedPreferences wrapper for both Mobile (Android/iOS), Web and Desktop (Windows, macOS, Linux). Also provides JSON file storage.

Latest version
3.1.0
30-day downloads
573
Likes
32
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

CrossLocalStorage is a Flutter/Dart package that provides a unified interface for persistent storage across mobile (Android/iOS), web, and desktop platforms (Windows, macOS, Linux). It wraps SharedPreferences for mobile and web while offering JSON file-based storage for desktop environments. The package ensures consistent data access regardless of platform, simplifying cross-platform app development. It supports both key-value storage and structured JSON file persistence, making it ideal for storing user preferences, app state, or small datasets reliably.

Use cases
  • Storing user preferences across platforms
  • Persisting app state in multi-platform apps
  • Saving configuration files as JSON
  • Managing local data in web and desktop apps
  • Sharing simple data between mobile and desktop
  • Enabling offline-first functionality
Key features
  • Unified API for all platforms
  • JSON file storage on desktop
  • SharedPreferences fallback on mobile/web
  • Platform-agnostic data access
  • Supports string, int, bool, and complex types
  • Automatic serialization/deserialization
Suitable for
  • Cross-platform Flutter developers
  • Apps requiring local persistence on multiple targets
  • Developers avoiding platform-specific code
  • Projects using JSON for local data
  • Teams prioritizing code reuse
  • Apps needing lightweight local storage
Considerations
  • Not suitable for large-scale data
  • JSON file storage may impact performance on desktop
  • Limited to simple data structures
  • No built-in encryption
  • Requires careful handling of file paths on desktop
  • Not designed for high-frequency writes
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add cross_local_storage

Categories

Dependencies

Dependency list 1 items

Source repository

Related projects

No data available yet.