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
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
97Compare - hive_ce
Fast NoSQL box storage with optional encryption and richer query features
96Compare
Works with
Packages commonly used together with get_storage: ones it builds on, ones built on it, and its own family.
- path_providerget_storage depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- getget_storage depends on itAll-in-one framework for reactive state management, context-less routing, and dependency injection.
- get_cliSame familyOfficial CLI for the GetX framework to scaffold projects, files, and manage dependencies.
- cached_video_player_plusBuilt on get_storageDrop-in wrapper for video_player that caches videos for offline playback.
- quran_libraryBuilt on get_storageAn integrated package for displaying the Holy Qur’an identical to the Medina Quran with the narration of Hafs on the authority of Asim.