Skip to content
pubscout

get_storage

2.1.1, released 4 years ago by getx.site

Synchronous key‑value storage with in‑memory cache and automatic disk backup.

Quiet but busy
$ flutter pub add get_storage
Source repository

What it does

Provides fast read/write of primitive types, maps and lists by keeping data in memory and persisting each operation to a file. The API is simple: read, write, remove, listen to changes.

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

Use it when

  • Need simple persistent key/value storage across app launches
  • Want immediate read access without async calls
  • Replacing SharedPreferences for lightweight data

Skip it when

  • Require complex queries, indexing or relational data
  • Need guaranteed disk write before next operation without awaiting
  • Need encryption or secure storage

Strengths

  • Very low latency reads/writes
  • Works on all major Flutter platforms
  • Built‑in listeners for reactive updates

Weaknesses

  • No encryption or secure storage
  • Not a full database – no indexing or relations
  • Backup to disk runs in background, so write completion isn’t immediate

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
import 'package:get_storage/get_storage.dart';

void main() async {
  await GetStorage.init();
  final box = GetStorage();
  box.write('greeting','Hello');
  print(box.read('greeting'));
}

Alternatives

Packages that do the same job and could replace get_storage.

  • shared_preferences

    Standard Flutter plugin for simple key/value storage with platform‑specific implementations

  • hive_ce

    Fast NoSQL box storage with optional encryption and richer query features

Works with

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