sqflite_store

Pub Version

Access your SQLite databases easily.

Getting Started

sqflite_store is available through pub.dev.

Add the dependency to your pubspec.yaml:

dependencies:
  ...
  sqflite_store: ^0.1.1

Usage example

Check the example folder.

Register the database in the main.dart

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await registerDbAsset('assets/main.sqlite', key: 'db', copy: 'once', defaultDb: true);

  runApp(const MyApp());
}

Get the database using the key.

final db = await getDatabase(key: 'db');

The db object is a instance of sqflite database.

Close all the databases in the repository.

closeDbStoree();

Libraries

sqflite_store