close database konditional

This commit is contained in:
Christian Pauly 2020-05-19 08:05:17 +00:00
parent 3ee5c2effa
commit b9d041d005

View file

@ -2181,9 +2181,9 @@ class Client {
/// Stops the synchronization and closes the database. After this
/// you can safely make this Client instance null.
Future<void> dispose() async {
Future<void> dispose({bool closeDatabase = false}) async {
_disposed = true;
await database?.close();
if (closeDatabase) await database?.close();
database = null;
return;
}