close method
Close the database, releasing resources.
Also disconnects any active connection.
Once close is called, this connection cannot be used again - a new one must be constructed.
Implementation
@override
Future<void> close() async {
// Don't close in the middle of the initialization process.
await isInitialized;
// Disconnect any active sync connection.
await disconnect();
if (!database.closed) {
// Now we can close the database
await database.close();
// If there are paused subscriptions on the status stream, don't delay
// closing the database because of that.
_connections.close();
await _activeGroup.close();
}
}