Skip to content
pubscout

sqlite_async

0.14.8, released 2 weeks ago by powersync.com

High-performance asynchronous SQLite interface for Dart and Flutter.

WASM-ready
$ flutter pub add sqlite_async
Source repository

What it does

Wraps SQLite bindings to provide asynchronous database operations, concurrent read/write transactions, WAL mode configuration, and query watching without blocking the main isolate.

AI-written summary of version 0.14.8, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need direct SQL query access without code generation overhead.
  • Your app requires high-performance concurrent read and write transactions.
  • You want to automatically watch and re-run queries on data changes.

Skip it when

  • You prefer a heavily typed ORM or object-relational mapping tool with code generation.
  • You only need simple key-value storage rather than a relational database.

Strengths

  • Asynchronous operations by default to prevent UI jank.
  • Supports concurrent transactions with WAL mode enabled.
  • Built-in query watching capabilities.

Weaknesses

  • Web support requires additional configuration of WASM and web worker assets.
  • Does not use code generation or model classes by default, requiring manual mapping from raw SQL results.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
7

Dart pub add sqlite_async. Web support requires access to sqlite3.wasm and db_worker.js files.

import 'package:sqlite_async/sqlite_async.dart';

void main() async {
  final db = SqliteDatabase(path: 'test.db');
  await db.execute('CREATE TABLE IF NOT EXISTS test_data(id INTEGER PRIMARY KEY AUTOINCREMENT, data TEXT)');
  await db.execute('INSERT INTO test_data(data) values(?)', ['Test1']);
  var results = await db.getAll('SELECT * FROM test_data');
  print('Results: $results');
  await db.close();
}

Alternatives

Packages that do the same job and could replace sqlite_async.

  • drift

    Choose drift if you prefer type-safe queries, relational mapping, and reactive streams via code generation.

  • sqflite

    Choose sqflite if you need the traditional SQLite plugin for Flutter with broad legacy usage.

  • hive_ce

    Choose hive_ce if you want a fast NoSQL key-value database instead of relational SQL.

Works with

Packages commonly used together with sqlite_async: ones it builds on, ones built on it, and its own family.