exportDump method

Future<String?> exportDump()

dumps the local database and exports it into a String.

WARNING: never re-import the dump twice

This can be useful to migrate a session from one device to a future one.

Implementation

Future<String?> exportDump() async {
  if (database != null) {
    await abortSync();
    await dispose(closeDatabase: false);

    final export = await database!.exportDump();

    await clear();
    return export;
  }
  return null;
}