Hive & NoSQL Local Storage
Learn to use Hive, a fast key-value NoSQL database for Flutter, to persist structured objects locally without SQL.
Why Hive?
Hive is a lightweight, pure-Dart key-value database. It is great when SQLite feels heavy and SharedPreferences feels too simple.
- Very fast reads and writes
- No native dependencies
- Stores Dart objects directly
Adding Hive
Add the packages to pubspec.yaml: hive, hive_flutter, and dev dependencies hive_generator and build_runner.
dependencies:
hive: ^2.2.3
hive_flutter: ^1.1.0
dev_dependencies:
hive_generator: ^2.0.1
build_runner: ^2.4.0All lessons in this course
- Shared Preferences for Data
- SQLite Database Integration
- File System Operations
- Hive & NoSQL Local Storage