Merge branch 'ChristianPauly-master-patch-06127' into 'master'

close database konditional

See merge request famedly/famedlysdk!311
This commit is contained in:
Christian Pauly 2020-05-19 08:10:11 +00:00
commit cec3401867
1 changed files with 2 additions and 2 deletions

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;
}