ChatConfig class

Configuration for Chat SDK.

Example

// At app startup
final config = ChatConfig(
  databasePath: 'chat.db',
);
Annotations

Constructors

ChatConfig({required String databasePath, String? encryptionKey, bool enableLogging = false, int maxRetryAttempts = 10, Duration heartbeatInterval = const Duration(seconds: 30), Duration syncInterval = const Duration(minutes: 5)})
Create basic configuration.
const
ChatConfig.withEncryption({required String databasePath, required String encryptionKey, bool enableLogging = false, int maxRetryAttempts = 10, Duration heartbeatInterval = const Duration(seconds: 30), Duration syncInterval = const Duration(minutes: 5)})
Create configuration with encryption enabled.
factory

Properties

databasePath String
Path to database file.
final
enableLogging bool
Enable debug logging.
final
encryptionKey String?
Encryption key for messages (optional).
final
hashCode int
The hash code for this object.
no setteroverride
heartbeatInterval Duration
Presence heartbeat interval.
final
maxRetryAttempts int
Maximum retry attempts for failed operations.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
syncInterval Duration
Background sync interval.
final

Methods

copyWith({String? databasePath, String? encryptionKey, bool? enableLogging, int? maxRetryAttempts, Duration? heartbeatInterval, Duration? syncInterval}) ChatConfig
Creates a copy with updated fields.
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.
override