Skip to content
pubscout

json_store

2.0.4, released 4 months ago by an unverified publisher

A key-value storage solution built on sqflite with encryption and time-to-live support.

Unverified publisher
$ flutter pub add json_store
Source repository

What it does

It provides a browser localStorage-like interface in Flutter for storing Dart JSON maps. Data is backed by SQLite, can be fully encrypted using secure storage for keys, and supports item expiration via time-to-live (TTL).

AI-written summary of version 2.0.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need simple key-value storage for JSON maps with optional encryption.
  • You want automatic expiration (TTL) for cached key-value data.
  • You need batch processing performance for writing multiple items.

Skip it when

  • you need reactive state management tied directly to storage changes.
  • your target Android minSdk is lower than 18.

Strengths

  • Built-in data encryption using secure storage for keys.
  • Supports time-to-live (TTL) expiration on stored items.
  • Batch processing for high-performance writes.

Weaknesses

  • Requires minimum Android SDK version 18.
  • Relies on a singleton architecture which may limit multi-instance configurations.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
4

In project/android/app/build.gradle set minSdkVersion to >= 18.

JsonStore jsonStore = JsonStore();
Map<String, dynamic> json = await jsonStore.getItem('counter');

Alternatives

Packages that do the same job and could replace json_store.

  • shared_preferences

    Pick if you need a standard lightweight key-value store without SQL overhead or built-in encryption needs.

  • drift

    Pick if you want a type-safe reactive SQL database library with code generation.

Works with

Packages commonly used together with json_store: ones it builds on, ones built on it, and its own family.