JonasLevin
JonasLevin

Reputation: 2099

Where is my sqflite database stored inside Flutter app?

I'm creating an encrypted sqflite database with sqflite_sqlcipher and would like to open it with the DB Browser for SQLCipher. For that i only need to find my .db file but I can't seem to figure out where this file is stored inside my app.
I have printed the path to the db in my init function and the output is below:

Future<Database> _initDatabase() async {
  print("Database path: ${await getDatabasesPath()}");
  final dbPath = await getDatabasesPath();
  final path = join(dbPath, "documents.db");
  final pw = await getPassword();

  return await openDatabase(
    path,
    password: pw,
    version: 1,
    onCreate: _onCreate,
  );
}

Database path: /data/user/0/com.example.did/databases

Upvotes: 0

Views: 4434

Answers (1)

Phil D
Phil D

Reputation: 94

You could access it using Android Studio, look for Device File Manager and from there, you can access the file path.

Upvotes: 2

Related Questions