sqflitecon

pub.dev

An interface for manage sqflite connections.

Usage

Setting up

  1. Make sure you are using flutter_dotenv right.
  2. Include the DATABASE_PATH variable to your .env file with the path of your sqflite database.

Getting connection

To get a connection instance you can use:

import 'package:sqflitecon/db.dart';

final connection = await DB.getConnetion();

Or just:

import 'package:sqflitecon/db.dart';

final connection = await databaseConnection();

In either case you can enter the same named parameters - like version, onConfigure - provided by sqflite (see here). An example below.

import 'package:sqflitecon/db.dart';

final connection = await databaseConnection(
    version: 1,
    onConfigure: onConfigure);

Libraries

db
unspecified_database_path