createDatabase method
Creates a database instance.
If databaseEncryptionConfig is provided, creates an encrypted database.
Implementation
Future<ChatDatabase> createDatabase() async {
if (_customDatabase != null) return _customDatabase;
final database = ChatDatabaseImpl(
databasePath: config.databasePath,
encryptionConfig: databaseEncryptionConfig,
);
await database.initialize();
return database;
}