sqlite3_library_windows 2.1.0 copy "sqlite3_library_windows: ^2.1.0" to clipboard
sqlite3_library_windows: ^2.1.0 copied to clipboard

discontinuedreplaced by: sqlite3_flutter_libs
outdated

Flutter package to bundle sqlite3 library to your windows apps

pub package

SQLite3 library for windows #

This package help you bundle SQLite3 library to your apps.

It can be used with packages like Moor to make the SQLite opening process easier (See: How to use with Moor).

How to use #

Add an override for windows and give it the openSQLiteOnWindows function provided by the package:

import 'package:sqlite3/sqlite3.dart';
import 'package:sqlite3/open.dart';
import 'package:sqlite3_library_windows/sqlite3_library_windows.dart';
 
late final Database db;

void main() {
  open.overrideFor(OperatingSystem.windows, openSQLiteOnWindows);
    
  // For database file creation and more please see the example
  db = sqlite3.open([YOUR_DB_FILE]);
     
  runApp(MyApp());
}

And... that's it! No need to provide your own sqlite3.dll file 🙂

How to use with Moor #

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

Then add an override for windows and give it the openSQLiteOnWindows function provided the package:

import 'package:sqlite3/sqlite3.dart';
import 'package:sqlite3/open.dart';
import 'package:sqlite3_library_windows/sqlite3_library_windows.dart';
 
void main() {
  open.overrideFor(OperatingSystem.windows, openSQLiteOnWindows);

  final db = sqlite3.openInMemory();
  db.dispose();
     
  runApp(MyApp());
}
7
likes
160
pub points
47%
popularity

Publisher

verified publishermilvintsiss.com

Flutter package to bundle sqlite3 library to your windows apps

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on sqlite3_library_windows