close database konditional
This commit is contained in:
parent
3ee5c2effa
commit
b9d041d005
|
@ -2181,9 +2181,9 @@ class Client {
|
||||||
|
|
||||||
/// Stops the synchronization and closes the database. After this
|
/// Stops the synchronization and closes the database. After this
|
||||||
/// you can safely make this Client instance null.
|
/// you can safely make this Client instance null.
|
||||||
Future<void> dispose() async {
|
Future<void> dispose({bool closeDatabase = false}) async {
|
||||||
_disposed = true;
|
_disposed = true;
|
||||||
await database?.close();
|
if (closeDatabase) await database?.close();
|
||||||
database = null;
|
database = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue