diff --git a/lib/src/client.dart b/lib/src/client.dart index 2b6ab05..aec5293 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -2181,9 +2181,9 @@ class Client { /// Stops the synchronization and closes the database. After this /// you can safely make this Client instance null. - Future dispose() async { + Future dispose({bool closeDatabase = false}) async { _disposed = true; - await database?.close(); + if (closeDatabase) await database?.close(); database = null; return; }