ChatRegistry class

Registry for Chat dependencies.

Follows the same pattern as dependency injection in other packages.

Example

// With custom adapter
final registry = ChatRegistry.withAdapter(
  config: config,
  adapter: MyBackendAdapter(),
);

Constructors

ChatRegistry.custom({required ChatConfig config, required ChatAdapter adapter, required ChatIdentityProvider identityProvider, DatabaseEncryptionConfig? databaseEncryptionConfig, EncryptionService? encryption, ChatDatabase? database})
Creates a registry with custom services.
factory
ChatRegistry.withAdapter({required ChatConfig config, required ChatAdapter adapter, required ChatIdentityProvider identityProvider, DatabaseEncryptionConfig? databaseEncryptionConfig})
Creates a registry with a single adapter.
factory

Properties

adapter ChatAdapter
final
config ChatConfig
final
databaseEncryptionConfig DatabaseEncryptionConfig?
Optional database encryption configuration.
final
hashCode int
The hash code for this object.
no setterinherited
identityProvider ChatIdentityProvider
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createDatabase() Future<ChatDatabase>
Creates a database instance.
createEncryption() EncryptionService
Creates an encryption service.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited