Skip to content
Blog

Isar Database for Flutter: Fast NoSQL Queries in Practice

A practical guide to Isar in 2026 — typed queries, indexes, watchers, and the v3 vs isar_community fork situation you need to know before adopting it.

Published on • October 9, 2026

AI Assistant

Isar is an extremely fast, fully async NoSQL database for Flutter. Where key-value stores make you fetch by primary key and filter in Dart, Isar gives you statically typed queries backed by indexes, full-text search, and reactive watchers that push results into your UI.

It is also a project with an unusual maintenance story in 2026 — worth understanding before you commit.

What Isar offers

  • Composite and multi-entry indexes
  • Statically typed, compile-checked queries
  • Full-text search
  • Watchers — streams that emit when a committed transaction changes the target
  • ACID semantics with parallel query operations and multi-isolate support
  • Multiplatform: Android, iOS, Linux, macOS, Windows, and Web
  • JSON support and query modifiers

The 2026 version situation (read this first)

Three facts decide your adoption risk:

  1. pub.dev stable is isar 3.1.0+1, published years ago. The README banner is blunt: “ISAR V4 IS NOT READY FOR PRODUCTION USE — if you want to use Isar in production, please use the stable version 3.”
  2. isar 4.0.0-dev.14 exists but cannot open v3 databases and has no migration support yet. Ship dates promised in the changelog have slipped repeatedly.
  3. The original repo is largely unmaintained; the community maintains isar_community (v3.3.2) — “a fork focusing primarily on bug fixes and small updates for version 3.”

For new production apps, start with the community fork:

dart pub add isar_community:3.3.2 isar_community_flutter_libs:3.3.2
dart pub add dev:isar_community_generator:3.3.2

Or on the official v3 line:

isar_version: &isar_version 3.1.0
dependencies:
  isar: *isar_version
  isar_flutter_libs: *isar_version   # bundles the Isar native core
dev_dependencies:
  isar_generator: *isar_version
  build_runner: any

Defining collections

Isar uses build_runner code generation. Annotate a class, declare a part file, and run the generator:

import 'package:isar/isar.dart';

part 'email.g.dart';

@collection
class Email {
  Id id = Isar.autoIncrement;

  late String title;

  @Index(type: IndexType.value)
  late String status;

  DateTime? receivedAt;
}

Then generate:

flutter pub run build_runner build --delete-conflicting-outputs

Other annotations: @embedded for embedded objects, @enumerated for enums, and multi-entry indexes for arrays that should be queryable per element.

CRUD

All mutations go through a write transaction:

final isar = await Isar.open([EmailSchema]);

// Insert / update
await isar.writeTxn(() async {
  await isar.emails.put(Email()..title = 'Amazing new database');
});

// Read
final email = await isar.emails.get(1);

// Delete
await isar.writeTxn(() async {
  await isar.emails.delete(email!.id);
});

Queries: where() vs. filter()

The split matters for performance:

  • .where() walks an index — use it whenever an indexed field is involved.
  • .filter() scans the collection — flexible, but linear.
// Index-backed
final important = await isar.emails
    .where()
    .titleStartsWith('Important')
    .limit(10)
    .findAll();

// Full scan with rich predicates
final awesome = await isar.emails
    .filter()
    .titleContains('awesome', caseSensitive: false)
    .sortByStatusDesc()
    .limit(10)
    .findAll();

Reactive UI with watchers

Watchers notify after a committing transaction changes the target — this is Isar’s answer to stream-based state management:

// Any change to the collection
Stream<void> changes = isar.emails.watchLazy();

// Re-runs the query and emits new results
Stream<List<Email>> results = important.watch();

results.listen((emails) => updateUI(emails));

Isar vs. Hive vs. Drift

IsarHiveDrift
ModelNoSQL typed objectsKey-value boxesSQLite + reactive SQL
QueryingIndexed filters + FTSGet by key onlyReal SQL
Reactivitywatch() streamsManual ValueListenableBuilt-in Stream queries
MigrationsWeak on v3ManualFirst-class, codegen
MaintenanceUse isar_communityCommunity fork (hive_ce)Very active

Pick Isar for large local datasets with real queries over object collections, Hive for simple caches, and Drift when your data is relational and must survive schema evolution.

Gotchas

  • Every model change requires re-running build_runner.
  • v3 ships native binaries via isar_flutter_libs — unit tests need await Isar.initializeIsarCore(download: true) and running with flutter test -j 1.
  • The Isar Inspector works in debug builds only.
  • OEM battery optimizers (Xiaomi, Huawei) can starve background work that relies on watchers.
  • Migrations off v3 are a one-way door — verify the v4 migration story before adopting a 4.0.0-dev build.

Wrapping up

Isar’s query ergonomics — typed filters, indexes, full-text search, and watchers — remain the best-in-class NoSQL story for Flutter. The 2026 caveat is governance, not capability: use isar_community on the v3 line for bug fixes, treat v4 as pre-release, and reach for Drift when relational migrations matter more than raw query speed.

References