SQLite3 library for linux

This package help you bundle SQLite3 library to your apps.

He was originally developed to use with moor but you can use it for others use cases that need SQLite3.

How to use with Moor

Be sure to follow all the steps to migrate from moor_flutter to moor ffi (doc).

Add an override for linux and give it the openSQLiteOnLinux function provided by the package:

import 'dart:ffi';
import 'dart:io';
import 'package:sqlite3/sqlite3.dart';
import 'package:sqlite3/open.dart';
import 'package:sqlite3_library_linux/sqlite3_library_linux.dart';

void main() {
  open.overrideFor(OperatingSystem.linux, openSQLiteOnLinux);

  final db = sqlite3.openInMemory();

And... that's it! No need to provide your own libsqlite3.so file🙂

For the moment the package does not provide support for arm64 architectures, if you need it feel free to do a pull request!