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

discontinuedreplaced by: sqlite3_flutter_libs

Flutter package to bundle sqlite3 library to your windows apps

pub package

This package is no longer maintained. #

This package was created to provide a simple way to bundle sqlite3 with your apps on windows as sqlite3_flutter_libs didn't provide support for this platform. This is no longer the case so I recommend the use of sqlite3_flutter_libs. Thanks to Simolus for this update! #

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
140
pub points
57%
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