Skip to content
CAI
Software that uses CAICheck a score

tekartik/sqflite

66.7

Adequate · 23 September 2026

21.5k

lines of production code

Dart

with Objective-C, Java, C

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a comprehensive SQLite database solution for Dart and Flutter, providing a unified API that supports native platform channels, FFI-based backends, and WebAssembly execution. It enables concurrent and asynchronous database operations across iOS, Android, desktop, and web environments, with specific implementations for shared isolates and background workers. The codebase includes extensive tooling for cross-platform testing, build automation, and integration validation across multiple execution contexts.

How it got here

2019–2020 — sqflite\_common extraction and FFI support

25 changes.

The project extracted the core SQLite logic into a standalone, non-Flutter library called sqflite\_common, enabling usage in command-line and FFI environments. Concurrently, an FFI-based implementation (sqflite\_common\_ffi) was introduced to support desktop and web platforms with isolate management and cross-platform compatibility. The period also involved extensive refactoring of build configurations, the addition of agent skills, and the creation of comprehensive test suites and CI tooling to validate these new architectures.

2022–2023 — Web and async FFI support

23 changes.

This period focused on introducing web platform support via a new sqflite\_common\_ffi\_web package, utilizing Shared Workers and IndexedDB for browser-based SQLite operations. Concurrently, the sqflite\_common\_ffi\_async library was developed to enable concurrent read/write transactions using sqlite\_async, improving performance for FFI-based database access. The work included extensive platform abstraction refactoring, setup tooling for WebAssembly binaries, and comprehensive test coverage for both web and async implementations.

2024–2026 — Platform abstraction and FFI isolation

22 changes.

The project established a standardized platform interface layer to decouple core logic from native implementations, enabling robust cross-platform support for Android, Darwin, and Web. Significant work focused on introducing the sqflite\_ffi plugin to facilitate shared database access across Flutter isolates and replacing external dependencies with internal forks for better control. Comprehensive testing infrastructure was built to validate these new architectures, including Swift Package Manager integration and isolated transaction handling.

Features

Add FFI-based SQLite example applications for Dart VM

The example directory now includes three Dart scripts demonstrating the FFI-based SQLite implementation on the Dart VM. These examples show how to initialize the FFI loader, perform in-memory and persistent database operations using the new \databaseFactoryFfi\, and query the SQLite version, utilizing the updated \Map\<String, Object?\>\ type signature.

_sqflite\_common\ffi/example · high confidence

Add example app demonstrating shared worker support

The example application for sqflite\_common\_ffi\_web has been updated to demonstrate the new shared worker implementation. The new files (index.html, main.dart, sw.dart, ui.dart, styles.css) provide a working demo that initializes the database factory using shared workers, including options to force basic worker fallback, and includes specific test logic for BigInt support and exception handling within the web worker context.

_packages\_web/sqflite\_common\_ffi\web/example · high confidence

Add isolated web1 example demonstrating custom SQLite worker and database naming

The example project now includes a new 'web1' directory containing an HTML page and Dart entry point that demonstrates configuring the sqflite\_common\_ffi\_web library with custom identifiers. This setup allows users to override the shared worker URI, IndexedDB name, and SQLite3 WASM file name, ensuring database isolation for testing or multi-instance scenarios.

_packages\_web/sqflite\_common\_ffi\_web\test/example · high confidence

Add shared UI components and test utilities for the example app

This change introduces a set of shared Dart source files for the \sqflite\_example\_common\ package, providing reusable UI widgets and testing helpers. It adds \ItemWidget\ and \MainItemWidget\ to display list items with state-based icons (such as success, failure, or running states) and tap handling, along with \common\_import.dart\ to centralize exports for internal utilities and platform interfaces. Additionally, it includes \dev\_utils.dart\ with deprecated helper functions for development-time printing and warning suppression, and \expect.dart\, which implements a custom \expect\ assertion function and \TestFailure\ exception for use in tests, mirroring standard Dart testing patterns.

_packages\_flutter/sqflite\_example\common/lib/src · high confidence

Added FFI async example application

The example application for the sqflite\_common\_ffi\_async package has been added, demonstrating how to initialize the FFI loader and use the asynchronous database factory to create tables, insert records, and query data.

_packages/sqflite\_common\_ffi\async/example · high confidence

Added FFI test utilities and web simulation plugin for the test app

The test application now includes new source files to support testing across desktop and web platforms. A new \ffi\_test\_utils.dart\ module provides helper functions for managing build directories, detecting the current desktop platform (Windows, macOS, Linux), and executing Flutter build commands for desktop targets. Additionally, \sqflite\_web\_sim.dart\ introduces a web plugin registration class that configures the default database factory to use the FFI-based web implementation, while \import.dart\ centralizes exports for development and debugging utilities from the underlying sqflite packages.

_sqflite\_test\app/lib/src · high confidence

Added FFI-based SQLite console test application

A new console application has been added to demonstrate initializing the SQLite FFI backend and performing basic database operations, such as opening an in-memory database, querying the SQLite version, and setting the database version.

_packages/console\_test\app/bin · high confidence

Added Linux setup utility script

A new Dart script (linux\_setup.dart) has been added to the tool directory to automate the installation of SQLite dependencies (libsqlite3-0 and libsqlite3-dev) on Linux systems, primarily to support CI environments.

_sqflite\_common\ffi/tool · high confidence

Added Swift Package Manager configuration utilities and iOS/macOS test project helpers

The sqflite\_support library now includes new tools to manage Swift Package Manager (SPM) integration and streamline testing on Apple platforms. A new spm.dart module provides functions to detect, enable, and disable the SPM feature in the Flutter environment, ensuring the installed Flutter version meets the minimum requirement (3.26.0). Additionally, test\_project.dart introduces utilities to create and clean iOS and macOS test projects, locate active iOS devices, and run applications in debug or release modes, facilitating easier validation of the plugin on these platforms.

_sqflite\support/lib · high confidence

Added Swift Package Manager test application for Darwin platforms

A new test application has been added to validate Swift Package Manager (SPM) support for the sqflite Darwin implementation. This location provides the iOS and macOS test project scaffolding, including configuration files (analysis options, gitignore) and a suite of tooling scripts to enable SPM, generate the test projects, and run or validate them on iOS and macOS targets.

_packages\_flutter/sqflite\_test\_app\_darwin\spm · high confidence

Added debug flag for web worker testing

A new debug utility has been added to the sqflite\_common\_ffi\_web package, exposing a \sqliteFfiWebDebugWebWorker\ getter and setter. This feature allows developers to toggle a debug state specifically for testing the web worker implementation, with the setter marked as deprecated to indicate its testing-only purpose.

_packages\_web/sqflite\_common\_ffi\web/lib/src/debug · high confidence

Added local tooling scripts for building and serving the sqflite\_common\_ffi\_web example

New Dart scripts have been added to the \tool\ directory to streamline the local development workflow for the \sqflite\_common\_ffi\_web\ package. These scripts automate the setup of SQLite binaries for the example directory, run \webdev\ to build or serve the application, and start a local HTTP server (\dhttpd\) for testing. This allows developers to easily set up, build, and serve the web worker example locally without relying on global installations or manual command sequences.

_packages\_web/sqflite\_common\_ffi\web/tool · high confidence

Added tool to generate escaped SQL keyword names

A new Dart script, generate\_escape\_names.dart, has been added to the tool directory. This script reads the official list of SQLite language keywords and outputs them as a list of escaped string literals, facilitating the generation of code that safely handles reserved SQL words.

_sqflite\common/tool · high confidence

Export Windows initialization helper

A new \setup.dart\ file is introduced in the Windows-specific source directory, exporting a \windowsInit\ function. This helper forces an in-memory SQLite database open and close in the main isolate, serving as a reference implementation to resolve known Windows DLL loading issues that occur when initialization happens in other isolates.

_sqflite\_common\ffi/lib/src/windows · high confidence

Extract sqflite\_common as a standalone library with sandboxing and iteration support

The core database logic has been extracted into the new sqflite\_common package, providing a platform-agnostic implementation for database operations, batching, and cursors. This change introduces a sandbox extension on DatabaseFactory that allows scoping database paths to a specific directory for isolation, and adds iteration extensions (rawQueryIterate, queryIterate) to process query results row-by-row without loading everything into memory. The package also includes a new DatabaseFileSystem abstraction for file operations and exposes extended SQLite result codes in exceptions for better error handling.

_sqflite\common/lib/src · high confidence

Initial commit of sqflite\_example\_common package

This change introduces the sqflite\_example\_common package, providing a shared example for using the sqflite plugin. It includes configuration files (analysis\_options.yaml, .gitignore), documentation (README.md) with instructions for running the Linux target, and a basic widget test structure.

_packages\_flutter/sqflite\_example\common · high confidence

Initial implementation of sqflite\_common\_ffi\_web with Shared Worker support

The \sqflite\_common\_ffi\_web\ package now provides a functional web implementation for SQLite, introducing a \databaseFactoryFfiWeb\ that utilizes a Shared Worker to run the SQLite3 WASM engine off the main UI thread. This change adds a new file system abstraction (\SqfliteDatabaseFileSystemFfiWeb\) that persists database files in IndexedDB, and includes a \checkOpenDatabaseArgumentsWeb\ validation that prevents opening persistent databases with \singleInstance: false\ to avoid corruption from concurrent writes without locking. The implementation also features a custom encoding layer in \utils.dart\ to safely serialize complex types like \BigInt\ across the worker boundary.

_packages\_web/sqflite\_common\_ffi\web/lib/src · high confidence

Initial release of sqflite 2.4.4 with agent skills and Dart 3.12 requirement

The sqflite package introduces version 2.4.4, which adds installable agent skills (\sqflite-crud-and-transactions\, \sqflite-open-database\, and \sqflite-testing-and-platforms\) to the \skills/\ directory. This release also enforces a requirement for Dart 3.12, aligning with the latest SDK standards.

sqflite · high confidence

Initial release of sqflite\_common\_ffi\_web\_test package

This change introduces the initial version (1.0.0) of the sqflite\_common\_ffi\_web\_test package, providing a dedicated test harness for the sqflite\_common\_ffi\_web library. The package includes configuration files (analysis\_options.yaml, dart\_test.yaml) to enforce strict linting and run tests across dart2js and dart2wasm compilers. It exposes a specific test context, SqfliteFfiWebNoWebWorkerTestContext, which allows running the standard sqflite\_common\_test suite against the FFI Web implementation without using web workers, alongside utility scripts for UI-based testing.

_packages\_web/sqflite\_common\_ffi\_web/lib, packages\_web/sqflite\_common\_ffi\_web\test · high confidence

Introduce FFI-based SQLite implementation with isolate support

The sqflite\_common\_ffi library is now available, providing an FFI-based implementation of sqflite. This release exports the core FFI initialization and database factory functions (databaseFactoryFfi, databaseFactoryFfiNoIsolate, createDatabaseFactoryFfi) and introduces a custom isolate port server (SqfliteFfiIsolatePortServer) to allow FFI imports in web apps and support for running FFI without spawning an isolate.

_sqflite\_common\ffi/lib · high confidence

Introduce concurrent FFI async database support for Dart and Web

This change adds a new asynchronous database implementation layer that leverages the \sqlite\_async\ library to enable concurrent read and write transactions, addressing previous blocking behavior. The update introduces platform-specific factories and database classes for both IO (native) and Web environments, allowing applications to open databases with concurrent access enabled by default. For users, this means improved performance and responsiveness when performing database operations, particularly in scenarios requiring parallel reads or writes, while maintaining compatibility with existing sqflite APIs.

_packages/sqflite\_common\_ffi\async/lib/src · high confidence

Introduce sqflite\_common\_ffi\_async library for async SQLite integration

A new library package, sqflite\_common\_ffi\_async, has been added to provide SQLite functionality built on top of sqlite\_async. This package exposes the FFI-based async database factories (databaseFactoryFfiAsync and databaseFactoryFfiAsyncTest) by re-exporting the core sqflite\_common API alongside the specific platform implementation, allowing users to utilize async SQLite operations via FFI.

_packages/sqflite\_common\_ffi\async/lib · high confidence

Introduce sqflite\_ffi plugin for cross-isolate SQLite access

A new Flutter plugin, sqflite\_ffi, is added to provide an FFI-based SQLite implementation that shares a single database isolate across multiple Flutter isolates (such as main, compute, and Isolate.run) using IsolateNameServer. This allows different parts of an application to access the same database instances seamlessly, unlike the previous sqflite\_common\_ffi which spawned separate isolates. The plugin automatically registers itself at startup to set sqfliteDatabaseFactoryFfi as the default factory, and includes platform-specific handling for web (no-op) and IO platforms (Windows, Mac, Linux).

_packages\_flutter/sqflite\ffi · high confidence

Introduction of sqflite\_darwin plugin entry point

A new entry point file (sqflite\_darwin.dart) has been added to the sqflite\_darwin package. This file defines the SqfliteDarwin class, which extends SqflitePlatform and provides a registerWith method to initialize the plugin using the method channel database factory. This change establishes the core registration logic for the Darwin-specific implementation of the sqflite plugin.

_sqflite\darwin/lib · high confidence

Introduction of sqflite\_platform\_interface for platform abstraction

A new platform interface layer has been added to the sqflite package, introducing the \sqflite\_platform\_interface\ library. This change establishes a standardized abstraction for database operations, allowing platform-specific implementations (such as Android and iOS/macOS) to register their own database factories via method channels. For users, this provides a more robust foundation for cross-platform database access, ensuring that platform-specific plugins can seamlessly integrate with the common sqflite API while maintaining consistent error handling and method invocation across different operating systems.

_sqflite\_platform\interface/lib · high confidence

New Android example demonstrating SQLite WAL mode

Added a new Android example application (\sqflite\_example\_android\_wal\) that demonstrates how to enable Write-Ahead Logging (WAL) mode in sqflite. The example configures the Android manifest to enable WAL and includes specific tests verifying that update and delete operations correctly return row counts in this mode, addressing a previously reported issue where these operations returned zero.

_packages\_flutter/sqflite\_example\_android\wal · high confidence

New CI tooling for cross-platform build and test automation

The sqflite\_support/tool directory now includes a suite of Dart scripts and shell utilities to automate continuous integration tasks across multiple platforms. These tools enable the automated creation, dependency configuration, and building of Android, iOS, macOS, and Web applications, as well as the execution of unit and integration tests. Specific scripts handle platform-specific setup, such as installing Linux system dependencies (sqlite3, ninja-build, libgtk-3-dev) and managing Android/IOS project generation and APK/IPA builds, ensuring consistent testing environments for the sqflite packages.

_sqflite\support/tool · high confidence

New CLI setup tool for configuring SQLite WASM binaries

A new command-line entry point (setup.dart) has been added to the sqflite\_common\_ffi\_web package, allowing users to build the shared worker and fetch the sqlite3.wasm binary. This tool provides options to specify a custom URL for the sqlite3.wasm file, skip fetching it entirely (for manual installation), force rebuilds, and control output verbosity and directory, giving developers more flexibility in how the WebAssembly dependencies are integrated into their web projects.

_packages\_web/sqflite\_common\_ffi\web/bin · high confidence

New example project scaffolding for sqflite\_darwin

The example directory now includes a complete project structure for iOS and macOS, featuring a main entry point that enables compatibility mode, a \.gitignore\ file tailored for Flutter/Dart development, and an \analysis\_options.yaml\ with strict linting rules. It also provides utility scripts to generate the platform-specific project files and run podspec lints, along with a basic widget test to ensure the example builds correctly.

_sqflite\darwin/example · high confidence

New experimental logger API for database events

An experimental logging system has been introduced in sqflite\_common, providing structured events for database lifecycle operations (open, close, delete) and SQL commands. This new API exposes specific identifiers such as databaseId and transactionId within logger events, allowing for more granular debugging and performance tracking of SQLite operations compared to previous generic logging methods.

_sqflite\common/lib/src/logger · high confidence

New mixin-based database factory for non-Flutter environments

The sqflite\_common library now exposes a new set of files under lib/src/mixin to support running database operations without Flutter plugins. This includes a buildDatabaseFactory function that creates a DatabaseFactory implementation by invoking a provided callback instead of using Flutter services, enabling unit testing and non-Flutter usage. The change also introduces helper exports for constants, development utilities, platform details, and a consolidated import\_mixin file that aggregates necessary internal classes for implementation packages like sqflite and sqflite\_common\_ffi.

_sqflite\common/lib/src/mixin · high confidence

New setup tooling for managing SQLite3 WebAssembly binaries and shared workers

The package introduces a new setup infrastructure in \lib/src/setup\ to handle the download, caching, and building of the SQLite3 WebAssembly binary and the associated shared worker. This includes a \SqfliteWebSetupOptions\ configuration class, a \SetupContext\ for managing build paths and metadata, and a \copy\_binaries\ entry point. Users can now explicitly control the setup process, including overriding the SQLite3 WASM URI, disabling automatic fetching, and managing the shared worker build output, replacing previous implicit or manual setup steps.

_packages\_web/sqflite\_common\_ffi\web/lib/src/setup · high confidence

New sqflite\_common example app with platform-agnostic test pages

The \sqflite\_example\_common\ package now provides a shared Flutter example application that consolidates various database test pages (Raw, Open, Batch, Exception, Manual, etc.) into a single navigable UI. To support cross-platform execution (including Web), the example introduces a \PlatformHandler\ abstraction in the \database/\ directory, with concrete implementations for IO (\database\_io.dart\) and a stub for Web (\database\_web.dart\), allowing the common test logic to interact with the file system where supported. The app entry point (\main.dart\) registers all test routes, and a separate FFI entry point (\main\_ffi.dart\) is provided to initialize the FFI database factory before running the example.

_packages\_flutter/sqflite\_example\common/lib · high confidence

New sqflite\_test\_app with multi-platform entry points

A new test application (sqflite\_test\_app) has been added to provide dedicated entry points for running the example suite across different platforms and configurations. The app includes specific main files for standard Flutter (main\_sqflite.dart), FFI-based execution on desktop/web (main\_ffi.dart), FFI with async support (main\_ffi\_async.dart), and various testing modes such as verbose logging (main\_dev.dart), single-route debugging (main\_dev\_single.dart), and test runner contexts (main\_sqflite\_test\_runner.dart). This structure allows users to easily switch between native SQLite, FFI implementations, and web workers for testing and development purposes.

_sqflite\_test\app/lib · high confidence

New tooling scripts for building, running, and testing the sqflite test app

The sqflite\_test\_app/tool directory now includes a comprehensive suite of Dart scripts to streamline development and testing workflows. These tools automate building and serving the web application (including JavaScript and WebAssembly targets) with necessary CORS headers, create and run the Flutter project on various platforms (Windows, Linux, macOS, iOS, Android), and execute integration and driver tests. Specific scripts handle FFI setup for web workers, release builds for desktop platforms, and simplified entry points for Chrome debugging, significantly reducing the manual effort required to set up and run the test application across different environments.

_sqflite\_test\app/tool · high confidence

New tooling scripts for web test setup and execution

Added a suite of Dart scripts in the \tool\ directory to streamline the setup and running of web-based tests for \sqflite\_common\_ffi\_web\. These scripts automate the installation of required binaries (SQLite WASM, service workers) via \setupSqfliteWebBinaries\ or the \sqflite\_common\_ffi\_web:setup\ CLI, and provide dedicated entry points for running tests in Chrome, including specific support for dart2wasm compilation and basic web worker scenarios.

_packages\_web/sqflite\_common\_ffi\_web\test/tool · high confidence

New utility functions and database configuration constants

The \sqflite\_common\ library now exposes helper functions \firstIntValue\ and \firstStringValue\ to easily extract the first value from query results, along with a \hex\ utility for encoding blobs for SQL queries. Additionally, new constants \sqflitePragmaPrefix\ and \sqflitePragmaDbDefensiveOff\ are provided to facilitate custom pragma usage, and the \setLockWarningInfo\ function allows users to configure database lock warning behavior.

_sqflite\common/lib/utils · high confidence

New web-focused test application for sqflite

A new web-only test application has been added to the sqflite ecosystem, providing a dedicated environment for testing \sqflite\_common\_ffi\_web\ and SQLite on the web platform. This app includes multiple entry points to exercise different execution modes, such as standard FFI, FFI without web workers, and basic web workers, alongside tools for building and serving the app via Chrome (both JS and WASM targets). It also features a custom web platform handler that utilizes \IndexedDbFileSystem\ for database storage, enabling comprehensive integration and driver testing for web-based SQLite operations.

_packages\_web/sqflite\_test\_app\web · high confidence

Web platform support for SQLite database operations

The database layer now supports running on web platforms by introducing a new \database\_web.dart\ implementation that uses \IndexedDbFileSystem\ to store and retrieve SQLite database files. This change adds conditional exports in \database.dart\ to select the appropriate platform handler (\database\_io.dart\ for native, \database\_web.dart\ for web), enabling the application to perform database operations like reading, writing, and checking file existence in a browser environment.

_sqflite\_test\app/lib/database · high confidence

Architecture

Extraction of sqflite\_common as a standalone, non-Flutter database layer

The core SQLite API and database factory logic have been extracted from the Flutter-specific sqflite package into a new, standalone library called sqflite\_common. This change introduces a new package structure with dedicated entry points: sqflite.dart for high-level database operations (openDatabase, getDatabasesPath, deleteDatabase), sqlite\_api.dart for the core abstract interfaces (DatabaseFactory, DatabaseExecutor), and sql.dart for SQL helpers. This separation allows developers to use the database layer in non-Flutter environments (such as command-line tools or FFI implementations) without depending on Flutter SDK packages, while the original sqflite package now acts as a Flutter-specific wrapper around this common core.

_sqflite\common/lib · high confidence

Behavioural changes

Android example app regenerated for Flutter 3.32.0+ and Gradle 9.3.1

The Android example application has been recreated using the default Flutter 3.32.0 template, updating the Android build system to Java 11 and Gradle 9.3.1. This change ensures the example app remains compatible with modern Flutter versions and provides a clean, standard configuration for testing the sqflite plugin on Android.

_sqflite\android/example · high confidence

Android implementation refactored with new operation model and SDK 36 support

The Android native code has been restructured to use a new operation-based architecture (BaseOperation, MethodCallOperation) and a dedicated worker pool for database tasks, which improves concurrency handling and fixes issues where different database instances were used for execution and results. The plugin now targets Android SDK 36, utilizing modern APIs like Thread.threadId() and Locale.of() where available, and includes updated build configurations and a new .gitignore.

_sqflite\android/android · high confidence

Darwin backend switches to an internal SqfliteDarwinDB fork

The sqflite Darwin implementation now uses a locally copied and renamed fork of the FMDB library (namespaced as \SqfliteDarwinDB\) instead of the external CocoaPods dependency. This change, visible in the new Objective-C source files (e.g., \SqfliteDarwinDatabase.m\, \SqfliteDarwinDatabaseQueue.m\) and the \README.md\, was made to bypass the outdated upstream FMDB version. Users must run \flutter clean\ and delete \Podfile.lock\ to ensure the build system picks up the new internal implementation.

_sqflite\darwin/darwin · high confidence

Enable compatibility mode in the example app

The example application now runs in compatibility mode by setting \supportsCompatMode\ to true in \main.dart\. This change, along with the new \compat\_test\_run.dart\ test file, allows users to verify the behavior of deprecated APIs (such as \Sqflite.setDebugModeOn\) and ensures the plugin functions correctly when older API patterns are used.

sqflite/example · high confidence

Expose internal FFI implementation details via handler mixin

The \handler\_mixin.dart\ file has been added to export specific internal components of the FFI-based SQLite implementation, including \ffiMethodCallhandleInIsolate\, \FfiMethodCall\, \SqfliteFfiException\, and exception wrapping utilities (\ffiWrapSqliteException\, \ffiWrapAnyException\). This change makes these internal implementation details available for use by other parts of the library or external consumers, effectively broadening the accessible API surface for the FFI backend.

_sqflite\_common\ffi/lib/src/mixin · high confidence

Introduce FFI database factory with isolate and no-isolate modes

The \sqflite\_common\_ffi\ library now exposes a dedicated FFI database factory (\databaseFactoryFfi\) that routes database operations through a background isolate by default, with an alternative \databaseFactoryFfiNoIsolate\ for running directly on the main thread. This architecture uses conditional imports to separate IO and web implementations, ensuring the isolate-based factory is unavailable on the web while providing a stub for web-specific handling. The change also includes a \DatabaseTracker\ to mitigate SQLite connection leaks and deadlocks during Flutter hot restarts by tracking native handles in an in-memory database, and introduces \SqfliteFfiException\ to expose extended SQLite result codes and transaction state in error messages.

_sqflite\_common\ffi/lib/src · high confidence

Platform abstraction refactored to support web environments

The platform detection logic has been restructured to introduce a unified \Platform\ abstraction that distinguishes between IO and web execution contexts. This change replaces previous platform-specific implementations with a conditional export strategy (\platform\_io.dart\ vs \platform\_web.dart\), enabling the library to correctly identify web environments via the \isWeb\ flag while maintaining existing OS-specific checks (Windows, iOS, Android, Linux, macOS) for native platforms. This structural shift lays the groundwork for web support by decoupling platform identity from direct IO dependencies in the common interface.

_sqflite\common/lib/src/platform · high confidence

Web worker implementation with shared worker support and fallback

The web library now executes SQLite operations in a background worker to improve responsiveness. It defaults to using a SharedWorker for better cross-tab state sharing, but automatically falls back to a standard Worker if SharedWorkers are unavailable (e.g., on Android mobile web). The implementation includes new configuration options (\sharedWorkerUri\, \forceAsBasicWorker\) to control worker behavior, robust JavaScript-to-Dart value conversion utilities, and improved error handling for worker initialization failures.

_packages\_web/sqflite\_common\_ffi\web/lib/src/web · high confidence

Test coverage

Add Flutter Driver integration tests for sqflite\_test\_app; Add web test demo for shared worker configuration; Added FFI and plugin-specific test runners and IO test helpers; Added FFI integration and platform build tests for sqflite\_test\_app; Added UI test entry points for single and no-worker modes; Added comprehensive test suite for sqflite\_common; Added iOS/macOS test app scaffolding for Swift Package Manager validation; Added integration tests for Flutter and Dart project workflows; Added integration tests for sqflite\_ffi\_simple\_bin execution modes; Added integration tests for sqflite\_test\_app; Added plugin test page for Darwin folder creation and isolate transaction handling; Added test coverage for web platform detection, database options, and data encoding; Added test runner for sqflite\_common\_ffi\_async; Added test suite for sqflite\_common\_ffi; Added tests for sqflite\_common\_ffi\_async database factory; Added tests for sqflite\_common\_ffi\_web setup and web worker configurations; Added tests for sqflite\_ffi isolate management and database operations; Added tests for the experimental Sqflite logger and FFI no-isolate factory; Android example app regenerated with Flutter 3.32.0 template and new instrumentation tests; New common test suite for sqflite\_common; New sqflite\_ffi test application for isolate sharing and sandboxing.

Dependencies

Update to Dart 3.12 SDK and modernize build configurations

The sqflite packages and their example applications have been updated to require the Dart SDK ^3.12.0. This change is accompanied by a migration of Android build files to the Kotlin DSL (build.gradle.kts) and an upgrade of the Android Gradle Plugin to version 9.1.0, along with setting Java compatibility to version 17. Additionally, the \sqflite\_common\_ffi\_async\ package has been introduced to provide an asynchronous FFI implementation based on \sqlite\_async\, and the \sqflite\_ffi\ Flutter plugin has been added to facilitate sharing the SQLite isolate across isolates using \IsolateNameServer\.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 55 → 67 (+11.7)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 97 → 94 (-3.3)
  • Architecture 99 → 98 (-1.7)
  • Maturity 42 → 45 (+3.6)
  • Readiness 61 → 77 (+16.4)
  • Security 53 → 90 (+37.4)
  • Domain Modelling 100 → 100 (+0.0)

Resolved (24)

  • Change coupling: database_factory_web.dart ↔ shared_worker.dart (packages_web/sqflite_common_ffi_web/lib/src/database_factory_web.dart)
  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No exposed public API
  • …and 4 more

New (54)

  • Change coupling: isolate.dart ↔ sqflite_ffi_io.dart (sqflite_common_ffi/lib/src/isolate.dart)
  • Database.batch (cognitive 25) (sqflite_android/android/src/main/java/com/tekartik/sqflite/Database.java)
  • Database.bindArgs (cognitive 16) (sqflite_android/android/src/main/java/com/tekartik/sqflite/Database.java)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (15 lines × 2) (sqflite_common/lib/src/batch.dart)
  • Duplicated block (28 lines × 2) (sqflite/lib/src/factory_impl.dart)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 34 more

Changes since last survey

  • 34 commits — 29 feature/other, 5 fixes

By area

  • packages/sqflite_common_ffi_async — 7 commits
  • packages_web/sqflite_common_ffi_web — 4 commits
  • packages_flutter/sqflite_ffi — 2 commits
  • sqflite_common_ffi/CHANGELOG.md — 2 commits
  • packages/console_test_app — 1 commit
  • packages/sqflite_common_ffi_async_test — 1 commit
  • packages_flutter/sqflite_example_android_wal — 1 commit
  • packages_flutter/sqflite_example_common — 1 commit
  • packages_web/sqflite_common_ffi_web_test — 1 commit
  • sqflite/CHANGELOG.md — 1 commit
  • sqflite/skills — 1 commit
  • sqflite_android/CHANGELOG.md — 1 commit
  • sqflite_android/example — 1 commit
  • sqflite_android/skills — 1 commit
  • sqflite_common/CHANGELOG.md — 1 commit
  • sqflite_common/skills — 1 commit
  • sqflite_common_ffi/lib — 1 commit
  • sqflite_common_ffi/skills — 1 commit
  • sqflite_darwin/CHANGELOG.md — 1 commit
  • sqflite_darwin/skills — 1 commit

Notable commits

  • fix: fix(sqflite_common_ffi_async): correct SqfliteDatabaseFactoryLogger name in package skill
  • fix: fix(sqflite_common_ffi_async): hang when accessing a database after close
  • fix: fix(sqflite_common_ffi_web): deleteDatabase and databaseExists when compiled with dart2wasm (#1216)
  • fix: fix: restrict meta package version to avoid compatibility issues
  • fix: fix: update build command to use --target flag for sqflite_ffi_simple_bin
  • change: androix example: update project configuration files and dependencies matching flutter 3.47 default
  • change: feat(sqflite): add sqflite-crud-and-transactions, sqflite-open-database, sqflite-testing-and-platforms package skills
  • change: feat(sqflite_android): add sqflite-android-setup package skill
  • change: feat(sqflite_common): add sqflite-common-api package skill
  • change: feat(sqflite_common_ffi): add sqflite-common-ffi-desktop, sqflite-common-ffi-testing package skills
  • change: feat(sqflite_common_ffi_async): add sqflite-common-ffi-async-factory package skill
  • change: feat(sqflite_common_ffi_web): add sqflite-common-ffi-web-options, sqflite-common-ffi-web-setup package skills
  • change: feat(sqflite_common_ffi_web): reject singleInstance: false for persistent databases (#1216)
  • change: feat(sqflite_darwin): add sqflite-darwin-setup package skill
  • change: feat(sqflite_ffi): add sqflite-ffi-flutter package skill
  • change: feat(sqflite_platform_interface): add sqflite-platform-interface-implementers package skill
  • change: feat: add package skills (dart.dev agent skills)
  • change: feat: add sqflite_common_ffi library and export sqflite_ffi
  • change: feat: add sqflite_common_ffi_async library for sqlite_async integration
  • change: feat: bump version to 2.4.2+1 and update changelog for sqflite_common_ffi
  • …and 14 more

Architecture

  • Containers 0 added · 0 removed · contexts 1 added · 1 removed · edges 0 added · 0 removed

Added bounded contexts (1)

  • sqflite

Removed bounded contexts (1)

  • .

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

tekartik/sqflite was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit aaabf90828645125bf7f4bd8e9a6fe4e3935b076 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.