Drift
Drift is a reactive persistence library for relational data in Dart and Flutter applications.
What Drift is
Drift is a reactive persistence library for relational data in Dart and Flutter applications. It maps database rows to selected objects and provides type-safe queries; watched queries can update as streams when the underlying data changes. Its SQL parser and analyzer can validate queries at compile time and generate Dart row code, using drift_dev and build_runner for code generation. Drift supports SQLite and offers packages for PostgreSQL and libSQL connections, including local-copy synchronization with libSQL. Developers can use migration utilities, but must write migrations when changing schemas used by existing apps. Encrypted databases are possible with SQLite3MultipleCiphers and a NativeDatabase executor, provided the app sets an encryption key. Documented implementations cover Android, iOS, Windows, Linux, macOS, and web. Some APIs, including date-time modification APIs, are SQLite-only with PostgreSQL. Full web support may require COOP/COEP security headers, and Chrome on Android can have cross-tab persistence issues without them. The documentation includes a DevTools extension page, and questions or feedback can go to GitHub discussions.
Good
- Type-safe queries map rows to chosen objects.
- Watched queries update as streams.
- Supports SQLite, PostgreSQL, and libSQL connections.
- Documented implementations cover mobile, desktop, and web.
Watch out
- Developers must write migrations for schema changes.
- Some PostgreSQL APIs are SQLite-only.
- Full web support may require security headers.
Who it suits
Drift is for developers building Dart or Flutter apps that need relational data persistence. It may suit teams that want reactive queries and type-safe access to database rows.
Verdict
Drift offers reactive, type-safe relational persistence across documented mobile, desktop, and web implementations. Developers should account for migration work and the stated PostgreSQL and web limitations.
The facts
Each one read from Drift's own pages, with the date it was checked.
What it does
- Backends
- The setup guide documents SQLite and PostgreSQL dependencies, and the documentation also covers remote libSQL and Turso.checked 29 Sep 2026
- Database integrations
- Drift supports SQLite and has packages for PostgreSQL and libSQL connections, including local-copy synchronization with libSQL.checked 30 Sep 2026
- Developer tools
- Drift provides a DevTools extension for inspecting databases and tables, modifying table contents, and validating schemas.checked 30 Sep 2026
- Dev tooling
- The setup uses drift_dev and build_runner to generate code at compile time.checked 29 Sep 2026
- Encryption
- Native databases can use SQLite3MultipleCiphers for encryption, and the documentation recommends this approach for new apps.checked 30 Sep 2026
- Intended users
- Drift is presented for developers building Dart and Flutter applications that need relational persistence.checked 29 Sep 2026
- Migrations
- Drift provides migration utilities, but developers need to write migrations when changing an existing database schema.checked 29 Sep 2026
- PostgreSQL limit
- Some APIs, including date-time modification APIs, are only supported with SQLite; most queries work with PostgreSQL without modification.checked 30 Sep 2026
- Reactive queries
- Queries can be watched as auto-updating streams that emit when the underlying data changes.checked 30 Sep 2026
- Schema changes
- Drift provides migration tools, but developers need to write migrations when changing a database schema used by existing apps.checked 30 Sep 2026
- SQL support
- Drift includes an SQL parser and analyzer that can validate queries at compile time and generate Dart row code.checked 29 Sep 2026
- Support
- The setup guide directs users with questions or feedback to start a discussion on GitHub.checked 30 Sep 2026
- Type safety
- Drift generates Dart objects for database rows and can analyze SQL at compile time to generate type-safe APIs.checked 30 Sep 2026
- What it does
- Drift is a reactive persistence library for relational data in Dart and Flutter applications.checked 30 Sep 2026
- What it is
- Drift is a reactive persistence library for relational data in Dart and Flutter apps.checked 29 Sep 2026
Where it runs
- Platforms
- Drift supports Android, iOS, Windows, Linux, macOS, and web through platform-specific database implementations.checked 29 Sep 2026
- Supported platforms
- The documented implementations support Android, iOS, Windows, Linux, macOS, and web.checked 30 Sep 2026
- Web browser requirements
- Some browsers need COOP/COEP security headers for full web support, and Chrome on Android can have cross-tab persistence issues without the required headers.checked 30 Sep 2026
The full review of Drift
Overview
Drift brings relational database work into Dart and Flutter projects with typed access to stored data. It is a strong fit for developers who want reactive queries without giving up SQL; teams should be ready to manage schema changes themselves.
Rows map to developer-chosen objects, and queries can be watched as streams that update when underlying data changes. That makes Drift useful when application logic or a UI needs to react to database updates rather than fetch results only on demand.
Its SQL parser and analyzer can validate queries at compile time and generate Dart row code. That is a meaningful safeguard for SQL-heavy projects, though the compile-time tooling comes with a code-generation setup using drift_dev and build_runner.
Key features
Relational data with reactive access
Type-safe queries and mapped rows give Dart code a structured way to work with relational data. Watched queries emit updated results when the database changes, a practical advantage for apps that need stored state and active views to stay in sync.
SQL and database choices
Drift supports SQLite and has packages for PostgreSQL and libSQL connections. Its documentation also covers remote libSQL and Turso, including local-copy synchronization with libSQL. Most queries work with PostgreSQL without modification, but some APIs, including date-time modification APIs, are SQLite-only. Projects that rely on those APIs should account for that backend difference.
Migrations and encryption
Migration utilities help with schema evolution, but developers must write migrations when changing a schema used by existing apps. That gives teams a path for managing upgrades, not an automatic way around migration work. For encrypted databases, Drift can use SQLite3MultipleCiphers with a NativeDatabase executor; the app must set an encryption key.
Offline and synchronization
Drift supports offline mode and bidirectional data synchronization. Those capabilities suit applications that must work with local data and synchronize in both directions, while the particular backend still matters: local-copy synchronization is documented for libSQL.
Pricing
Drift is free, with a free plan. No paid tier is part of its stated pricing model, so there is no plan-based seat allowance, usage quota, trial period, or renewal term to weigh. The trade-off is not a tier limitation but the engineering work of setting up code generation and writing migrations for existing schemas.
Platforms
Drift's documented implementations support Android, iOS, Windows, Linux, macOS, and web. On the web, some browsers need COOP/COEP security headers for full support. Chrome on Android can have cross-tab persistence issues without those headers, so web deployments need to account for their hosting configuration and browser behavior.
The project also has a Drift DevTools extension page. For questions or feedback, the setup guide points developers to GitHub discussions.
Who it's for
Drift is aimed at developers building Dart and Flutter applications that need relational persistence. It is especially well suited to projects that benefit from typed data access, compile-time SQL checks, and query streams, and that can own their schema migration process.
It is a less natural fit when a project depends on PostgreSQL-only feature parity or needs web persistence to work without browser and hosting considerations. Those constraints do not rule Drift out, but they make backend and deployment choices part of the decision.
Pros and cons
- Pro: Type-safe queries, row mapping, and generated Dart row code give relational data a structured place in Dart applications.
- Pro: Watched queries update as underlying data changes, supporting reactive application logic.
- Pro: SQLite, PostgreSQL, and libSQL integrations offer multiple relational backend paths, with offline use and bidirectional synchronization supported.
- Con: Existing database schemas require developer-written migrations, adding ongoing upgrade work.
- Con: Some APIs are SQLite-only, and web deployments can require COOP/COEP headers to avoid support and cross-tab persistence issues.
- Con: Compile-time generation requires setting up drift_dev and build_runner.
Alternatives
For a broader comparison, see Mobile Databases.
Espresso is a free Android UI-testing option for projects targeting Android 4.0.1/API 14 or later; choose it when testing an Android app interface is the need rather than relational persistence.
Hive offers a free forever plan with 1,000 AI credits per month, 200MB storage, up to 10 workspace members, and unlimited tasks. Pick it when those workspace-oriented allowances fit better than Drift's Dart and Flutter relational approach.
RxDB has a free plan with replication and realtime sync, default storages, and up to 13 open collections. It may suit a project prioritizing that replication-and-storage combination over Drift's relational, SQL-oriented model.
Ditto offers a free plan with 10 cloud device connections, 2GB storage, 5GB data transfer, no SLA, and limited support; consider it when those cloud connection limits match the project.
ObjectBox has a no-cost core database plan; consider it as an alternative if a no-cost core database is the priority.
Firebase Cloud Messaging is a no-cost messaging service, not a direct substitute for relational persistence.
Firestore has stated free-tier allowances of 50,000 document reads and 20,000 document writes per day. Choose it when those document-database quotas are a better fit than Drift's relational approach.
TBase is another free database option to consider.
Verdict
Choose Drift for a Dart or Flutter app that needs typed relational access, reactive query results, and offline or bidirectional synchronization without a software fee. Its strongest reason to choose it is the combination of SQL analysis and streams within a Dart-oriented persistence library. Look elsewhere if PostgreSQL API coverage or web persistence without extra deployment considerations is essential, or if the team cannot take on schema migrations.
Alternatives to Drift
- 1
Hive
Free planOpen sourceAndroidiOSWebAPI8.6From $5 a month - 2

Firestore
Free planAndroidiOSWebAPI8.1$0.03 usage-based - 3
SQLDelight
Free planOpen sourceAndroidiOSWebAPI7.9Free plan - 4
PouchDB
Free planOpen sourceAndroidiOSWebAPI7.8Free plan - 5

Sparksee
Free planAndroidiOSAPILinux7.6Free plan - 6

RxDB
Free planAndroidiOSWebAPI7.5From $99 a month
