sqflite_common
2.5.17, released 10 days ago by tekartik.com
Dart wrapper on SQLite providing the common API for sqflite and desktop FFI implementations.
WASM-readyRock solid
What it does
It provides a platform-agnostic Dart wrapper and shared API for SQLite databases. It is primarily intended to allow developers to write logic shared across Flutter apps and desktop binaries.
AI-written summary of version 2.5.15, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are writing platform-agnostic logic shared between Flutter and desktop binaries using SQLite.
- You are developing a package that wraps sqflite APIs for multiple platforms.
Skip it when
- You are writing a standard Flutter mobile app (use sqflite instead).
- You are writing a desktop-only app (use sqflite_common_ffi instead).
Strengths
- Enables writing platform-agnostic business logic using sqlite_api.
- Serves as the common foundation for sqflite and sqflite_common_ffi.
Weaknesses
- Not intended for direct use in standard applications.
- Requires proper platform-specific implementations to be imported alongside it.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Add to pubspec.yaml and import sqlite_api.dart when writing shared cross-platform logic.
import 'package:sqflite_common/sqlite_api.dart';Alternatives
Packages that do the same job and could replace sqflite_common.
Works with
Packages commonly used together with sqflite_common: ones it builds on, ones built on it, and its own family.
- synchronizedsqflite_common depends on itLock mechanism to prevent concurrent access to asynchronous code.
- sembastSame familyA NoSQL persistent embedded document-based database for Dart and Flutter.
- idb_shimSame familyCross-platform IndexedDB implementation for Dart and Flutter.
- process_runSame familyRun shell scripts and locate executables across Linux, Windows and macOS.
- sembast_webSame familyNoSQL persistent embedded database for the Web on top of IndexedDB.
- fs_shimSame familyPortable file system API working identically on io, web (IndexedDB/OPFS) and memory.
- sqfliteBuilt on sqflite_commonSQLite plugin for Flutter supporting iOS, Android and MacOS.
- sqflite_common_ffiBuilt on sqflite_commonFFI-based implementation of sqflite for desktop platforms and unit tests.