exportDatabaseToJsonlFile function

Future<void> exportDatabaseToJsonlFile(
  1. Database db,
  2. String path, {
  3. List<String>? storeNames,
})

Write the export in a file (currently in .jsonl format)

Implementation

Future<void> exportDatabaseToJsonlFile(Database db, String path,
    {List<String>? storeNames}) async {
  var file = File(path);
  await file.parent.create(recursive: true);
  await file.writeAsString(exportLinesToJsonlString(
      await exportDatabaseLines(db, storeNames: storeNames)));
}