isar
3.1.0+1, released 4 years ago by isar.dev
Extremely fast NoSQL database for Flutter with async support and static typing.
Quiet but busy
What it does
Isar is a NoSQL database built for Flutter and desktop. It provides ACID semantics, compile-time checked queries, full-text search, and real-time database watchers.
AI-written summary of version 3.1.0+1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a fast, local NoSQL database with complex query capabilities in Flutter.
- You require real-time data streaming via database watchers.
- You want compile-time type-checked queries and auto-generated collection schemas.
Skip it when
- You require traditional relational SQL tables with complex joins.
- You are targeting web platforms with this specific version (web support is not present in 3.0.0+).
Strengths
- Exceptional read and write performance.
- Built-in support for embedded objects, multi-entry indexes, and full-text search.
- Real-time database and query watchers.
Weaknesses
- Requires code generation (`build_runner` and `isar_generator`).
- Requires passing an explicit directory when opening instances (since 3.1.0).
Setup
- Kind
- FFI (native library)
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 3
Add isar, isar_flutter_libs, and isar_generator with build_runner to your pubspec.yaml, then annotate your models with @collection.
final dir = await getApplicationDocumentsDirectory();
final isar = await Isar.open(
[EmailSchema],
directory: dir.path,
);
final emails = await isar.emails.filter()
.titleContains('awesome', caseSensitive: false)
.sortByStatusDesc()
.limit(10)
.findAll();Alternatives
Packages that do the same job and could replace isar.
Works with
Packages commonly used together with isar: ones it builds on, ones built on it, and its own family.