close method

  1. @override
Future<void> close()
inherited

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();
  // Now we can close the database
  await database.close();
}